These are some MySQL questions. I was wondering if someone could help me with th
ID: 3720956 • Letter: T
Question
These are some MySQL questions. I was wondering if someone could help me with these SQL commands.
Schema EMPLOYEE (employee_id, store_id, last_name, first_name, phone, email, salary) PRODUCT (product id, category_id, product_code, product_name, description, list_price, discount_percent, dateadded, vendor_id) CUSTOMER (customer id, emailaddress, password, first_name, last_name, shipping_address_id, billing_address_id) CATEGORY (category_id, category_name) ORDERS (order id, customer_id, employee_id, store_id, order_date, ship_amount, tax_amount, ship_date, shipping_address_id, cardt_ype, card_number, card_expires, billing_address_id) ORDERITEMS (item_id, order id, product id, item_price, discount_amount, quantity) VENDOR (vendor id. company_name, contact_Iname, contact_fname, address, city, state, zip, phone, fax, email) ADDRESS (Address ldd, Customer_ld, Linel, Line2, City, State, Zip_Code, Phone, Disabled) STORE (store_id, store_id, region_id, region_name) ADMINISTRATORS (admin_id, email_address, password, first_name, last_name)Explanation / Answer
1)select customer_id,last_name,first_name from CUSTOMER where Customer id between '22229' and '66669'
/*This query will list customer_id, last_name,first_name from customer table*/
customer_id last_name first_name
22256 shell Mitchell
66543 Gabriel Mathew
2)select * from EMPLOYEE where salary not in ('3400','3000','6000') and last_name like 'S_%'
/*This query will list the employee details who doesnot get salary of 3400,3000,6000*/
employee_id store_id last_name first_name phone email salary
12345 123 Shell Mitchell 12345272 abc@in.com 2345
3)select order_id,order_date,ship_date from ORDERS where ship_date is NULL.
/*This query will list the order_id,order_date,ship_date from Orders table where ship_date is null*/
order_id order_date ship_date
1234 12/03/2018 NULL
1235 13/03/2018 NULL
4)select last_name,first_name from CUSTOMERS where last_name like '%_IN_%' order by last_name,first_name
/*This query will list last_name, first_name from customesr where last name conatins 'IN'*/
last_name first_name
sherlin Mathew
Belinda Nickie
As per chegg policy, first 4 questions need to be answered whenever many sub parts in a question.
Thanks for understanding
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.