please provide the create & insert statement in the description box ....
@Srinitechnologies4 ай бұрын
table details are updated, check it
@nirmalaswain45984 ай бұрын
sir please provide the data set also
@Srinitechnologies4 ай бұрын
table information updated in description, please check
@vasanthkumar-zw3xf4 ай бұрын
with cte as ( select min(ldate) mdate,cust_id from login group by cust_id) select l.ldate, sum(case when c.mdate=l.ldate then 1 else 0 end) new_cust, sum(case when c.mdatel.ldate then 1 else 0 end) reapet_cust from cte c inner join login l on c.cust_id=l.cust_id group by l.ldate;