SQLize Online / PHPize Online

A A A
Share   Donate   Blog   Popular
Copy Format Clear
create table deal ( start_date date, end_date date, "sum" integer ); insert into deal values ('2010-01-01', '2011-01-01', 1), ('2010-04-15', '2011-04-15', 3); select '2010-05-02' as "date", sum("sum") from deal where '2010-05-02'::date between start_date and end_date union select '2011-02-02', sum("sum") from deal where '2011-02-02'::date between start_date and end_date
Stuck with a problem? Need help? Ask professionals on our Telegram channel!
Join the channel
Your quersion is posted.
Join our Telegram channel and get answers.
Send
Copy