Assignment5QueriesLastnameFirstName - - List all...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
-- List all information about all listings --ok SELECT * from a5_listing; f -- List all listings that successfully ended (status = 'Completed') --ok SELECT * from a5_listing where Lis_status = 'Completed'; w -- Count the number of listings who got funded (status = 'Completed') and the number of listings who didn't get funded (status = 'Expired) -- (Use one statement, use group by) --ok SELECT lis_status, COUNT (*) FROM a5_listing GROUP BY lis_status; G -- What are the different credit grades that exist in listings? -- Your statement should return only the seven possible credit grades --ok SELECT DISTINCT lis_credit_grade from a5_listing; f -- What is the average maximum rate for each of the credit grades? (tip, use group by) --ok SELECT lis_credit_grade, max(lis_maximum_rate) FROM a5_listing GROUP BY lis_credit_grade; G -- Select the listing key, amount requested, maximum rate, title, and credit grade for all listings with the credit grades of AA, A, and B. -- Sort the results by maximum rate (highest value first)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Assignment5QueriesLastnameFirstName - - List all...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online