题目内容

Question4:Can you create a cross-tab report in my SQL Server!
How can I get the report about sale quality for each store and each quarter
and the total sale quality for each quarter at year 1993?
You can use the table sales and stores in datatabase pubs.
Table Sales record all sale detail item for each store. Column store_id is the id of
each store, ord_date is the order date of each sale item, and column qty is the
sale qulity. Table stores record all store information.
I want to get the result look like as below:
Output:
stor_name Total Qtr1 Qtr2 Qtr3 Qtr
4
---------------------------------------- ----------- ----------- ----------- -----------
-----------
Barnum's 50 0 50 0 0
Bookbeat 55 25 30 0 0
Doc-U-Mat: Quality Laundry and
Books 85 0 85 0 0
Fricative Bookshop 60 35 0 0 25
Total 250 60 165 0 25

查看答案
更多问题

Question6: How can I add row numbers to my result set?
In database pubs, have a table titles , now I want the result shown as
below,each row have a row number, how can you do that?
Result:
line-no title_id
----------- --------
1 BU1032
2 BU1111
3 BU2075
4 BU7832
5 MC2222
6 MC3021
7 MC3026
8 PC1035
9 PC8888
10 PC9999
11 PS1372
12 PS2091
13 PS2106
14 PS3333
15 PS7777
16 TC3218
17 TC4203
18 TC7777

哪个VIEW用来判断 tablespace的剩余空间

Question11: How can I list all book with prices greather than the
average price of books of the same type?
In database pubs, have a table named titles , its column named price mean
the price of the book, and another named type mean the type of books.
Now I want to get the result as below:
type title price
------------
--------------------------------------------------------------------------------
---------------------
business The Busy Executive's Database
Guide 19.9900
...
...
...
...

如何启动SESSION 级别的TRACE

答案查题题库