Advertisement
hecrus

Metric 3

Oct 24th, 2020
2,537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.18 KB | None | 0 0
  1. select top 10 (select name from tst_customers where id = customerID) customer, count(*) cnt from tst_orders
  2. where productID = @hide_productID
  3. group by customerID
  4. order by count(*) desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement