题目内容

Question 1:Can you use a batch SQL or store procedure to calculating
the Number of Days in a Month

查看答案
更多问题

Question2:Can you use a SQL statement to calculating it!
How can I print "10 to 20" for books that sell for between $10 and $20,
"unknown" for books whose price is null, and "other" for all other prices?

巴拿赫病故于1945 年8 月31 日。他的出生年份恰好是他在世时某年年
龄的平方,问:他是哪年出生的?

Question 7: Can you tell me what the difference of two SQL statements at
performance of execution?
Statement 1:
if NOT EXISTS (select * from publishers where state = 'NY')
begin
SELECT 'Sales force needs to penetrate New York market'end
else
begin
SELECT 'We have publishers in New York'
end
Statement 2:
if EXISTS (select * from publishers where state = 'NY')
begin
SELECT 'We have publishers in New York'
end
else
begin
SELECT 'Sales force needs to penetrate New York market'
end

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

答案查题题库