rd shinde

rd shinde

  • NA
  • 4
  • 2.9k

about sql query

Mar 27 2014 8:18 AM
I have 2 tables
 
tblLog and tbluser
tblLog 
-UserId
-Date
-Validity(bit) ---0 for invalid 1-valid
-StatusId
 
tblUser
-UserId
-UserName
 
I want to getting datewise Valid and Invalid count data if i entered UserName
e.g
if i entered Username=3 and fromDate=25/03/2014 and toDate=27/03/2014
 
Date                 Valid          Invalid
25/03/2014      0                 1
26/03/2014      5                 4
27/03/2014      1                 2
 
how should I write query for showing above data ?
 
 

Answers (3)