Home > database >  This kind of request, SQL to achieve? If you can, please give directions
This kind of request, SQL to achieve? If you can, please give directions

Time:10-26

New inventory table, the old inventory table, order table, the table is new goods come out

Inventories old table and new table through the commodity name, id + warehouse right connection to draw new commodity
With a new product table + within 28 days old inventory table to match the order
In the old inventory list of goods for pin according to the system time. More than 7 days, within 14 days of 7, 7 a, remember to 14...
New goods table record of 7

CodePudding user response:

Get new goods after table, according to the structure and the old stock list inventory table union all into a big table, big table to add a new logo to distinguish the new goods and used goods,

Then, give the order for the big table and table, according to the old and the new logo, as well as the date of the order date and the system date interval, through the case when & lt; 7, 7-14 to judge,
  • Related