Home > database >  How to write the table transformation of SQL statements
How to write the table transformation of SQL statements

Time:11-04

Have a table of contents is as follows:

Product ID for the loading and unloading time type
1 in the 2020-10-1
1 out of 2020-10-2
2 in the 2020-11-1
2 out of 2020-11-2
3 in the 2020-11-3

A product ID in the table or only one inventory records, either at the same time have a inbound and outbound records
How to use the SQL query into a like this:

Product ID inventory time dispatch time
1 2020-10-1 2020-10-2
The 2020-11-1 2020-11-2
3 the 2020-11-3 NULL

  • Related