Looking for DataBase Fundamentals new test answers and solutions? Browse our comprehensive collection of verified answers for DataBase Fundamentals new at softserve.academy.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is a transaction in PostgreSQL?
Which of the following is NOT true about granting privileges in PostgreSQL?
What are Privileges in PostgreSQL?
What is the purpose of SQL roles?
What is the purpose of transaction logs in PostgreSQL?
sales, which contains information about sales transactions. The sales table has columns for the date of the transaction, the name of the salesperson, the product sold, and the amount of the sale. You want to create a grouped view that shows the total sales amount for each salesperson and product combination.Example of the sales table:
| sale_date | salesperson | product | sale_amount |
|---|---|---|---|
| 2022-03-01 | John Smith | Product A | 100.00 |
| 2022-03-01 | Jane Doe | Product B | 75.00 |
| 2022-03-02 | John Smith | Product C | 50.00 |
| 2022-03-03 | Bob Johnson | Product A | 25.00 |
| 2022-03-03 | Jane Doe | Product B | 150.00 |
Which of the following CREATE VIEW statements would accomplish this?
customers and orders, with the following data:customers table:
| customer_id | customer_name | address | city |
|---|---|---|---|
| 1 | John Smith | 123 Main St. | Anytown |
| 2 | Jane Doe | 456 Oak St. | Other town |
| 3 | Bob Johnson | 789 Maple Ave. | Another town |
orders table:
| order_id | customer_id | order_date | total_amount |
|---|---|---|---|
| 1 | 1 | 2022-03-01 | 150.00 |
| 2 | 2 | 2022-03-02 | 75.00 |
| 3 | 1 | 2022-03-03 | 25.00 |
| 4 | 3 | 2022-03-04 | 50.00 |
Which of the following CREATE VIEW statements would create a vertical view that displays the customer name, order ID, and total amount for all orders?