Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What is this telling me

Posted on 2011-03-06
2
Medium Priority
?
314 Views
Last Modified: 2012-05-11
Is  this query telling me how many users entries were made in my aspnet_Profile table on the particular dates? If so How do I request the total entries for a particular date/month/year.
SELECT Dateadd(day, Datediff(day, 0, LastUpdatedDate), 0) as CreatedOn, Count('UserId') as [Count]
FROM aspnet_Profile
GROUP BY Dateadd(day, Datediff(day, 0, LastUpdatedDate), 0)
ORDER BY 1

2011-02-15 00:00:00.000	145
2011-02-16 00:00:00.000	1196
2011-02-17 00:00:00.000	8046
2011-02-18 00:00:00.000	162
2011-02-19 00:00:00.000	145
2011-02-20 00:00:00.000	4648
2011-02-21 00:00:00.000	4546

Open in new window

0
Comment
Question by:ruffone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 2000 total points
ID: 35051317
yes

if you want a particular day, you would do this:

SELECT Count('UserId') as [Count]
FROM aspnet_Profile
WHERE Dateadd(day, Datediff(day, 0, LastUpdatedDate), 0) = '<yourdatehere>'

for a particular month:

SELECT Count('UserId') as [Count]
FROM aspnet_Profile
WHERE MONTH(LastUpdatedDate) = '1' and YEAR(LastUpdatedDate) = '2011'

or the count for each month:


SELECT  MONTH(LastUpdatedDate) as [Month], YEAR(LastUpdatedDate) as [Year], Count('UserId') as [Count]
FROM aspnet_Profile
GROUP BY MONTH(LastUpdatedDate), YEAR(LastUpdatedDate)
ORDER BY 2, 1
0
 
LVL 4

Author Closing Comment

by:ruffone
ID: 35068574
Thanks
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question