
SQL Server
- 25 ответов
- 0 вопросов
12
Вклад в тег
select date(dt), strftime('%H', dt), max(un)
from dS
where dt between datetime('now','localtime','-24 hours') and datetime('now','localtime','-0 hours');--тут нужные сутки
group by date(dt), strftime('%H', dt)
select COALESCE(price, 0) + COALESCE(price2, 0) + COALESCE(price3,0) as suma from prices