Home > database >  Pick up the day before the current time data
Pick up the day before the current time data

Time:11-05

I am to have such a scene, the query condition store number start time to end time
the article numberTable A
Id no store sales number to describe time
the article number1 1001 12345 60 2020-10-1
2, 2001, 4444 to 50 2020-10-2

==========================
I want to take:
Store 1001 12345 2020-10-1 to 2020-10-1 the article number of the number of sales over a period of time
Pick up the day before the current time data
If you have: take out the number of
If no: 0


The record sets, an SQL statement to write out?


CodePudding user response:

Time period is 2020-10-1 to 2020-10-1 this period of time, or the day before the current time,
  • Related