Advertisement
AmidamaruZXC

Untitled

Dec 13th, 2020
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.16 KB | None | 0 0
  1. SELECT f.supplier_id, AVG(f.price)
  2. OVER(PARTITION BY f.supplier_id) avg_price
  3. FROM food f
  4. INNER JOIN supplier s ON f.supplier_id = s.id
  5. ORDER BY s.fullname;
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement