Home > database >  SQL server statement, a great god, please help
SQL server statement, a great god, please help

Time:02-03

Date the customer name revenue
2021/1/1 A 15 A
2021/1/1 a 5 B
2021/1/1 department 2 A, 2
2021/1/1 department 2 B 1
2021/1/1 three 3 C
2021/1/2 a 3 E
2021/1/2 department 2 F 5
2021/1/2 section 2 C 2
2021/1/2 three A 2
2021/1/2 three B 100
2021/1/2 three 5 C
Omit many rows of data behind ~ ~ ~

O: within a certain date, each department of revenue in the first three customer name and income
The following table:
The customer name revenue
A E 210
A 200 B
A C 180
Section 2 A 10
Section 2 B 9
Section 2 C 8
The three C 100
Three 80 B
Three D 50

  • Related