Created
November 11, 2024 02:46
-
-
Save ardianta/f55732fb75b4254ac1fbfef4ca751e1e to your computer and use it in GitHub Desktop.
Revisions
-
ardianta created this gist
Nov 11, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ SELECT HOUR(CONVERT_TZ(`bookingCreatedAt`, '+00:00', '+08:00')) AS jam, -- convert UTC time to local time +08:00 COUNT(*) AS total_booking FROM Booking -- table name WHERE YEAR(`bookingCreatedAt`) = 2024 AND MONTH(`bookingCreatedAt`) = 10 -- month of year 2024 GROUP BY jam ORDER BY jam LIMIT 100