Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Drill down values...

$
0
0
Hi,I've an orders table with customer and supplier (customer_id, supplier_id, order_id, order_date, ...)Is it possible to get the total orders from a customer and drill down to the supplier in the same query?Possible output:customer | supplier | total ordersc1 | | 4c1 | s1 | 2c1 | s2 | 1 c1 | s3 | 1c2 | | 2c2 | s2 | 2Thanks,Pedro

Viewing all articles
Browse latest Browse all 3145

Trending Articles