导入
Question: SQL Modes
检查你对 SQL 模式如何影响 MySQL 会话中查询行为的理解。
Table
| Field | Type |
|---|---|
| CustomerID | int |
| CustomerName | varchar(50) |
| varchar(50) | |
| Phone | varchar(15) |
| Address | varchar(100) |
| LastLogin | date |
| CreatedAt | timestamp |
| CustomerTier | enum('New','Regular','VIP') |
| ReferralID | int |
| LoyaltyPoints | int |
| LastPurchaseDate | date |
| IsChurnRisk | tinyint(1) |
| Field | Type |
|---|---|
| OrderID | int |
| CustomerID | int |
| OrderDate | date |
| TotalAmount | decimal(10,2) |
| ShippedDate | date |
| DeliveryStatus | enum('Pending','Shipped','Delivered','Cancelled') |
| EmployeeID | int |
| CreatedAt | timestamp |
| ExpectedDeliveryDate | date |
| ActualDeliveryDate | date |
| LateDelivery | tinyint(1) |
| PaymentMethod | enum('Credit Card','PayPal','Cash on Delivery') |
| ReturnCount | int |
| FraudRisk | tinyint(1) |
Table
| CustomerID | CustomerName | TotalSpent |
|---|---|---|
| 2 | Jane Smith | 950.00 |
| 13 | Kelly Martin | 910.00 |
| 22 | Tina Van | 850.00 |
| 1 | John Doe | 725.99 |
| 25 | Wendy Young | 630.00 |
| 10 | Henry Ford | 630.00 |
| 7 | Emily Davis | 570.00 |
| 17 | Olivia Queen | 520.00 |
| 20 | Rachel Turner | 510.00 |
| 4 | Bob Brown | 500.00 |
| 18 | Peter Roberts | 430.00 |
| 9 | Grace Hill | 410.00 |
| 24 | Victor X | 390.00 |
| 14 | Larry Nelson | 380.00 |
| 19 | Quincy Stone | 300.00 |
| 21 | Sam Underwood | 300.00 |
| 6 | David Clark | 300.00 |
| 23 | Uma White | 230.00 |
| 3 | Alice Johnson | 230.00 |
| 12 | Jake Long | 200.00 |
| 16 | Nick Perez | 195.00 |
| 15 | Mia Owens | 190.00 |
| 11 | Ivy King | 190.00 |
| 5 | Carol White | 175.00 |
| 8 | Frank Green | 130.00 |
| 30 | Noah Vale | 100.00 |
1/* Configure the session for reporting */ 2-- Write your SET SESSION sql_mode command here 3 4/* Verification */ 5SELECT "c"."CustomerID" AS CustomerID, 6 "c"."CustomerName" AS CustomerName, 7 SUM("o"."TotalAmount") AS TotalSpent 8FROM "Customers" AS "c" 9JOIN "Orders" AS "o" 10ON "c"."CustomerID" = "o"."CustomerID" 11GROUP BY "c"."CustomerID", "c"."CustomerName" 12ORDER BY TotalSpent DESC;
The required skills are as follows:
- Knowledge of MySQL SQL modes
- Understanding of identifier quoting rules
The required skills are as follows:
- Knowledge of MySQL SQL modes
- Understanding of identifier quoting rules
No configuration found for ID: 3cfa8b845e4521c141f534824c05f519fbff2fce9e7c6a40a011322968f29e9d