Using the CoffecDB database, do the following queries. JUST TURN IN QUERIES (the
ID: 3709509 • Letter: U
Question
Using the CoffecDB database, do the following queries. JUST TURN IN QUERIES (the SQL code), NOT THE DB (table create) CODE!!!! Ensure you number each one (as in)- 1. Display all records in the country table; sort by country name, Z to A 2. Display inventory description and type (only coffee or tea): sort by type. 3. Display state name, population, land area and tax rate for all states where the land area is greater than 50,000 square miles 4. Display state name and whether it has a web Site for all states that do not have a web site. 5. Display consumer first and last name, phone number and credit limit, for all consumers whose first name starts with a D (ok this is a police situation and your only clue is that letter!). Sort by last name (Z to A). Note: all persons are presumed innocent until tried in a court of law. 6. Display quantity, price, and discount (from order line table) for all records where the price is less than or equal to 15 or the discount is greater than .05. 7. Display last name, commission rate, hire date, and gender for all employees who are women who were also hired on or after Dec 15, 1995. Sort by last name. Z to A 8. Display last name, state, sredit limit and whether the consumer is favored or not, for those consumers whose credit limit is between $7500 and S10000 or who are not favored consumers.Explanation / Answer
Answer 1:
select * from COUNTRY order by COUNTRY_NAME desc;
Answer 2:
select INVT_DESC,type from TABLE_NAME order by type;
Answer 3:
select ST;ATE_NAME,POP,LAND_AREA,TAX_RATE from TABLE_NAME where LAND_AREA>50000
Answer 4:Question not clear
Answer 5:
select FIRST_NAME,LAST_NAME,PHONE_NUMBER,CREDIT_LIMIT from TABLE_NAME where FIRST_NAME like "D%" order by LAST_NAME desc;
Answer 6:
select QUANTITY,PRICE,DISCOUNT from ORDER_LINE where PRICE<=15 or DISCOUNT>0.05;
Answer 7:
select LAST_NAME,COMM_RATE,HIRE_DATE,GENDER from TABLE_NAME where GENDER='F" and HIRE_DATE>='15-12-1995' order by LAST_NAME desc;
Answer 8:
Question not clear
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.