Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Robert Hacko BUS-18 LAB 6.
- 1.
- A store places 0 or more orders, orders can be taken from 1 and only 1 store.
- A store employs 0 or more employees, an employee is employed by 1 and only 1 store.
- An employee has 0 or many dependents, a dependant has 1 and only 1 employee they depend upon.
- An order contains 1 or many order_lines, an order line references 1 and only 1 order.
- An order line lists 1 and only 1 product. A product is written in 0 or many order lines.
- 2. attached.
- 3. Order line would need an ORDER_ID and a PRODUCT_ID.
- 4. the PK of employee as well as a unique dependant ID.
- 5. Case insensitive! the command is: SELECT first_name, last_name FROM customers WHERE last_name="lee";
- 6. SELECT first_name, last_name WHERE state_province="ca" OR state_province="ny";
- 7. SELECT first_name, last_name WHERE id > 10;
- 8. SELECT product_name, quantity_per_unit FROM products WHERE quantity_per_unit != "NULL";
- 9. SELECT transaction_type, transaction_created_date FROM inventory_transactions WHERE transactions_created_date like '2006-04-%%';
- 10. SELECT product_name, standard_cost, standard_cost * 1.05 FROM products;
- 11. SELECT first_name, last_name FROM customers WHERE first_name like 'j%' ORDER BY 1;
- 12. SELECT first_name, last_name FROM customers WHERE first_name NOT LIKE '%a' ORDER BY 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement