Home > database >  The SQL statement, a great god genuflect is begged for help
The SQL statement, a great god genuflect is begged for help

Time:12-28

Table 1
Date name list number
2020/12/1 zhang 1234567
2020/12/1 li si 4568892
2020/12/1 li si 4532453
2020/12/2 zhang 4352435
2020/12/4 two 5675671
2020/12/5 zhang 4345341
2020/12/6 zhang 7678690

Table 2
Date name single amount
2020/12/1 zhang SAN 5
2020/12/1 li si 10
2020/12/1 two 6
2020/12/2 li si 2
2020/12/2 two 3
2020/12/3 zhang SAN 8
2020/12/4 zhang 9

Table 3
Name group workshop,
Zhang a set of a workshop three warehouse
Li si two groups a workshop warehouse
Two three group workshop five warehouse


Want to become a watch
Dates (table 1) single amount name list (table 2). The total amount of single department
2020/12/1 zhang SAN 1 5 6 three warehouse
2020/12/1 li si 2 10 12 second warehouse
King 2020/12/2 2 0 3 3 5 warehouse


Everyone a great god what method can be realized? Bother to guide, thank you very much,
  • Related