I have a table that has several columns, including a column for the amount of tickets sold and a sales time column, I want to know how many tickets were sold at any given hour.
For example
time | tickets |
---|---|
10:45 | 5 |
10:30 | 6 |
10:15 | 3 |
10:00 | 2 |
11:14 | 8 |
11:30 | 6 |
Here is the query I wrote-
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
SELECT hour(time) as hour, tickets FROM Showtimes_View
group by hour(time)
order by hour
The query ran well on my MySQL, The problem is that when I try to run it in Google Data Studio, I get an error.