Advertisement
Step8rother

Применение агрегирующих функций, задача 6

Jun 24th, 2023
1,320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.25 KB | Source Code | 0 0
  1. --Посчитайте среднюю стоимость заказов, оформленных в понедельник.
  2.  
  3. SELECT AVG(total)
  4. FROM invoice
  5. WHERE CAST(invoice_date AS TIMESTAMP) = DATE_TRUNC('week', CAST(invoice_date AS TIMESTAMP));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement