Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I did query between these dates 01.04.2013-07.04.2013

so data comes like that
03.04.2013
03.04.2013
04.04.2013
05.04.2013
05.04.2013
05.04.2013

I will check one by one between 01.04.2013-07.04.2013

I will get 01.04.2013 0 DATA
02.04.2013 0 DATA
03.04.2013 2 DATA
04.04.2013 1 DATA
05.04.2013 3 DATA
06.04.2013 0 DATA
07.04.2013 0 DATA

first query will get list of data between two date 01.04-07.04.2013 this is OK There is no problem here

second query will be number of datas one by one in old query result

I didnt do please help me
database mysql c# code
Posted
Comments
[no name] 25-Mar-13 18:27pm    
"second query will be number of datas one by one in old query result" makes absolutely no sense at all.
Member-2338430 25-Mar-13 18:32pm    
I will send a function 01.04.2013 date thisfunction looks is there this date between interval if there is how many it will count
Member-2338430 25-Mar-13 18:36pm    
I want to do like this

select count(id) from x where 01.04.2013 (exists,in I dont know)(select dates from x(same database)from datestart between 01.04.2013 and 7.04.2013)
Member-2338430 25-Mar-13 18:36pm    
nested query

1 solution

Try this query

SQL
select dd,count(dd) from d group by dd having dd>='2013-04-01' and dd<='2013-04-07';
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900