Шукаєте відповіді та рішення тестів для DataBase Fundamentals new? Перегляньте нашу велику колекцію перевірених відповідей для DataBase Fundamentals new в softserve.academy.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
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?