繁星淼淼
SELECT 11 as conment FROM tableName tbWHERE tb.dataDateBETWEEN (SELECT date_add(DATE_FORMAT(date_add(now(),interval -5 day),'%Y-%m-%d %T'),interval -15 minute))AND(SELECT date_add(DATE_FORMAT(date_add(now(),interval -5 day),'%Y-%m-%d %T'),interval +15 minute))UNIONSELECT 11 as conment FROM tableName tbWHERE tb.dataDateBETWEEN (SELECT date_add(DATE_FORMAT(date_add(now(),interval -4 day),'%Y-%m-%d %T'),interval -15 minute))AND(SELECT date_add(DATE_FORMAT(date_add(now(),interval -4 day),'%Y-%m-%d %T'),interval +15 minute))UNIONSELECT 11 as conment FROM tableName tbWHERE tb.dataDateBETWEEN (SELECT date_add(DATE_FORMAT(date_add(now(),interval -3 day),'%Y-%m-%d %T'),interval -15 minute))AND(SELECT date_add(DATE_FORMAT(date_add(now(),interval -3 day),'%Y-%m-%d %T'),interval +15 minute))UNIONSELECT 11 as conment FROM tableName tbWHERE tb.dataDateBETWEEN (SELECT date_add(DATE_FORMAT(date_add(now(),interval -2 day),'%Y-%m-%d %T'),interval -15 minute))AND(SELECT date_add(DATE_FORMAT(date_add(now(),interval -2 day),'%Y-%m-%d %T'),interval +15 minute))UNIONSELECT 11 as conment FROM tableName tbWHERE tb.dataDateBETWEEN (SELECT date_add(DATE_FORMAT(date_add(now(),interval -1 day),'%Y-%m-%d %T'),interval -15 minute))AND(SELECT date_add(DATE_FORMAT(date_add(now(),interval -1 day),'%Y-%m-%d %T'),interval +15 minute))