CREATE TABLE orders ( id INT PRIMARY KEY, customer_id INT, courier_id INT, seller_id INT, order_timestamp_utc DATETIME, amount FLOAT, city_id INT ); INSERT INTO orders (id, customer_id, courier_id, seller_id, order_timestamp_utc, amount, city_id) VALUES (1, 101, 201, 301, '2023-01-15 10:30:00', 50.00, 401), (2, 102, 202, 302, '2023-01-16 11:45:00', 75.50, 402), (3, 103, 203, 303, '2023-01-17 12:15:00', 120.25, 403), (4, 104, 204, 304, '2023-01-18 09:00:00', 30.75, 404), (5, 105, 205, 305, '2023-01-19 14:20:00', 90.80, 405); Q.1 Which hour has the highest average order volume per day? Your output should have the hour which satisfies that condition, and average order volume. Approach 1: With CTE WITH RankedHours AS ( SELECT DATEPART(HOUR, order_timestamp_utc) AS hour_of_day, AVG(amount) AS average_order_...
27th February 2022, started with late-night (26th February) advance wishing. For the first time, I slept early, then witnessed a lot of WhatsApp messages. I did not go through all of them straight away, and I got ready for cycling. I cycled for 21 kilometres and wanted to put a good note towards the end of this month—346 Km of 400 Km in February. When I reached home, mummy hugged me and wished me "Happy Birthday". My day just started. Saw my niece record a Happy Birthday message video, and she was excited to expect me. There were a few more surprises today- my brother in law, sister, and Ishaan planned a lunch party at Big Barbeque, Marthahalli. We had a good time till 5:00 PM. I love earrings, and my sister got them only as my birthday present. Vijay, with whom I am meeting for marriage purposes, was the first person who wished me a Birthday. I was the second person who sat in his car after his Mother. The vehicle looked lavish, classic. He gifted me a valet, a mirror, and ...