Home > database >  How to query based on the data of a given query three days before the date of if one day no data pus
How to query based on the data of a given query three days before the date of if one day no data pus

Time:04-09

Want to ask next check if a given date forward three days of data not just skip the must go to check the three days of data
Such as data 7 8 6, no. 5 is also have 4 data how to write SQL queries to the data from 8, 5, 4
The answer to genuflect is begged

CodePudding user response:

1, write a function (parameters for the specified date), and then date 1 day as a condition whether there is data query, countless according to the callback function itself, have more stitching date string, three date to return the result until joining together,
2, the query SQL will be the result of the function as a condition,

Have a try,
  • Related