Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
anchoredwisdom
Starting Member
22 Posts |
Posted - 2009-08-28 : 02:10:21
|
| select S1.X,S2.Y from (select count(*) as X from biw_01.sales_order_line_dimwhere sales_order_line_type = 'UK Internal Line') S1inner join( select count(*) as Y from biw_01.sales_order_line_dimwhere sales_order_line_type = 'UK Trial') S2Can anyone provide me a sample SQL in the above scenario |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2009-08-28 : 02:17:19
|
[code]SELECT COUNT(CASE WHEN sales_order_line_type = 'UK Internal Line' THEN 1 END)X, COUNT(CASE WHEN sales_order_line_type = 'UK Trial' THEN 1 END)YFROM biw_01.sales_order_line_dim[/code] Hope can help...but advise to wait pros with confirmation... |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-08-28 : 02:39:54
|
quote: Originally posted by anchoredwisdom select S1.X,S2.Y from (select count(*) as X from biw_01.sales_order_line_dimwhere sales_order_line_type = 'UK Internal Line') S1inner cross join( select count(*) as Y from biw_01.sales_order_line_dimwhere sales_order_line_type = 'UK Trial') S2 Can anyone provide me a sample SQL in the above scenario
N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|