In class 12 SQL II submission file

docx

School

Saint Louis University *

*We aren’t endorsed by this school

Course

3100

Subject

Information Systems

Date

Dec 6, 2023

Type

docx

Pages

4

Uploaded by imteazmahmud2

Report
In class 12 SQL II Name: _____________ Q21: SQL Command: select Id,fullname, price,eps from stock where price<500 and eps>5; Result Screenshot: Q29: SQL Command: SELECT * from stock where fullname like '%INC%'; Result Screenshot:
Q32: SQL Command: SELECT sector, AVG(eps) as AvgEPSPerSector from stock group by sector HAVING AvgEPSPerSector>10 order by sector desc; Result Screenshot: Q33: SQL Command: SELECT *, CASE WHEN eps is null then NULL WHEN eps<5 then 'low' when eps<10 then 'medium' else 'high' end as EPSLevel from stock;
Result Screenshot: Q34: Write out your own case: select price where if price is less than 200 label as low, if its less than 500 label as medium, if its less than 1000 label as high other wise label as max, label the column as PriceLevel and finally limit the results to 3. SQL Command: SELECT*, case when price is null then NULL when price<200 then 'low' when price<500 then 'medium' when price<1000 then 'high' else 'max' end as PriceLevel from stock limit 3; Result Screenshot:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help