using sql 1. List the city, state, and zip codes in the customer table. Your out
ID: 3747485 • Letter: U
Question
using sql
1. List the city, state, and zip codes in the customer table. Your output should not have duplicates. (5 points)
2. List the name, department, phone number, and email address of employees with a phone number beginning with “5-”. (5 points)
3. List all columns of the resource table with a rate between 10 and 15 including the end points 10 and 15. Sort the result by rate. (5 points)
4. List the event requests with a status of “Approved” or “Denied” and an authorized date in July or August 2018. Include the event number, authorization date, and status in the output. In Oracle, you surround a date constant with single quotes. Use the default date format as shown in textbook Chapter 4. Text constants in Oracle are case sensitive. *** Change to updating values in one table without need to reference the other table. (5 points)
5. List the location number and name of locations that are part of the “Basketball arena”. Your query must not use the facility number (“F101”) of the basketball arena in the WHERE clause. Pretend that the user knows only the facility name, not the facility number. Thus, the WHERE clause should not have a condition involving the facility number compared to a constant (“F101”). Text constants in Oracle are case sensitive. *** Change to delete location rows without need to reference Faciity table. *** (5 points)
Explanation / Answer
1. Select distinct zipcode,city, state from Customer;
2.Select e_name,e_dept,e_phone,e_email from Employees Where e_phone like "5-%";
3. Select * from Resource Where rate Between 10 AND 15 ;
4. Select event_rqst,event_num,auth_date, event_status from Event Where event_status IN ('Approved','Denied') AND auth_date IN('July 2018', 'August 2018');
5.Select loc_name , loc_number ,loc_facility from Location Where loc_facility="Basketball arena";
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.