Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
EXEC spCrossTabRun
'select title from pubs.dbo.titles t inner join pubs.dbo.sales s on (s.title_id=t.title_id) group by title',
'IsNull(sum(qty),0)',
'stor_id'
[b][green]TITLE 6380 7066 7067 7131 7896 8042[/green][/b]
But Is It.... 0 0 0 0 0 30
Computer P... 0 0 0 20 0 0
Cooking wi... 0 0 0 0 0 25
Emotional.... 0 0 0 25 0 0
Fifty Year... 0 0 20 0 0 0
Is Anger t... 3 75 10 20 0 0
Life Witho... 0 0 0 25 0 0
Onions, Le... 0 0 40 0 0 0
Prolonged.... 0 0 0 15 0 0
Secrets of... 0 50 0 0 0 0
Silicon Va... 0 0 0 0 10 0
Straight T... 0 0 0 0 15 0
Sushi, Any... 0 0 20 0 0 0
The Busy E... 5 0 0 0 0 10
The Gourme... 0 0 0 25 0 15
You Can Co... 0 0 0 0 35 0
EXEC spCrossTabRun
'select pub_name as Publisher, count(qty) as Orders, sum(qty) as Qty from pubs.dbo.sales s inner join pubs.dbo.titles t on (s.title_id=t.title_id) inner join pubs.dbo.publishers p on (p.pub_id=t.pub_id) where round(price*qty/100,0)*100<500 group by pub_name',
'avg(case when price<5 then 5 else price end)',
'round(price*qty/100,0)*100'
[b][green]
Publisher Order Qty 0.00 100.00 200.00 300.00 400.00[/green][/b]
Algodata Infosystems 6 135 NULL 19.99 19.99 15.97 NULL
Binnet & Hardley 7 150 5 5 15.97 14.99 21.59
New Moon Books 8 208 10.95 7.975 8.6466 19.99 NULL
DECLARE @B varchar(200)
SET @B='B'
SET @B= 'SELect LastName FROM Northwind.dbo.Employees e INNER JOIN Northwind.dbo.Orders O ON (E.EmployeeID=O.EmployeeID) where ShipName<'+@B+' GROUP BY LastName'
EXEC spCrossTabRun
@B,
'count(lastname)',
'Left(ShipName,8)'
[b][green]
LastName Alfreds Alfred's Ana Truj Antonio Around [/green][/b]
Callahan 0 0 0 0 1
Davolio 0 2 0 1 3
Dodsworth 0 0 0 0 2
King 0 0 1 2 0
Leverling 0 1 2 3 2
Peacock 0 2 1 1 4
Suyama 1 0 0 0 1