0

write a query to display day and the total_units of electricity consumed on each day between the dates '2018-05-06' and '2018-05

Sql

9th Apr 2021, 9:04 AM
Ashish Katta
Ashish Katta - avatar
4 ответов
0
SELECT day, unit, SUM(unit) AS total_units FROM tableName WHERE date BETWEEN startDate AND endDate
9th Apr 2021, 10:19 AM
Akib
Akib - avatar
0
No it not working
9th Apr 2021, 10:22 AM
Ashish Katta
Ashish Katta - avatar
0
Probably cause date is not working with between.
9th Apr 2021, 10:31 AM
Akib
Akib - avatar