Table columns: MJJCJLXXBZ access to record information identification, xm's name, id GMSFZHM, MJDBH access point number, sk_rqsj time
CodePudding user response:
The SELECT arjun JJCJLXXBZ a.x m, al-qeada MSFZHM, arjun JDBH, a.s k_rqsj FROM record name a JOIN (
The SELECT GMSFZHM, CONVERT (VARCHAR (8), sk_rqsj, 112) sk_rqsj FROM record name WHERE DATEDIFF (dd, sk_rqsj, GETDATE ()) & lt;=3 GROUP BY GMSFZHM, CONVERT (VARCHAR (8), sk_rqsj, 112) HAVING a COUNT (1) & gt; 10
B) ON al-qeada MSFZHM=b.g MSFZHM AND CONVERT (VARCHAR (8), a.s k_rqsj, 112)=b.s k_rqsj
Is probably so, nearly three days don't know what do you want to calculate to greatly the day before yesterday, if you don't put & lt;=3 to & lt; 3