Using the tables in Q3 above, write a SQL that produces a list of employees maki
ID: 3577197 • Letter: U
Question
Using the tables in Q3 above, write a SQL that produces a list of employees making less than $20 per hour that work at store number 222. This list will be provided to the branch manager and she only needs the first and last name of the employees and their hourly rate. The manager wants it in alpha order by last name. Your field specifications state that the store number is defined as character and hourly rate as decimal. Using the tables in Q3, the construction manager needs to visit each store that is over 1000 square feet (stored as numeric) to review existing city violations. However, the manager only wants to visit those stores that actually have a violation open. The store_violations field stores a numeric value of number of violations that are open. Although the manager doesn't want to see the number of violations, he wants a special indicator for you to add next to the store square footage number of a "V" to remind him that there are violations open. You have been asked to create a report that looks as follows:Explanation / Answer
1. select employee_last_name,employee_first_name,employee_hourly_wage from employee where employee_hourly_wage <20 and store_number ='222' order by employee_last_name;
2. select store_number,store_address,store_city,store_state, store_square_ft||'V' as store_square-ft from store where store_square_ft > 1000 and store_violations>0;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.