Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:44:28+00:00 2026-06-03T22:44:28+00:00

I am working with a charting program to show monthly inventory totals. So far

  • 0

I am working with a charting program to show monthly inventory totals. So far I only have data for May (the June data will be inserted into the table automatically on June 1st and timestamped).

I am using the below query, and it returns 1 row showing 375 devices for the month of May like this:

devices     created_month
-------     -------------
375         5/1/2012

Is this query set up properly so that on June 1st if I have 380 devices I will receive the following output?

devices     created_month
-------     -------------
375         5/1/2012
380         6/1/2012

I’d just like to confirm that I am interpreting this query properly.

SELECT count(device_type) as devices, description, ip_address, user_tag,                  
  DATE_FORMAT(LAST_UPDATE,"%Y-%m") as created_month 
FROM ahrq_inventory_internal 
GROUP BY created_month
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:44:29+00:00Added an answer on June 3, 2026 at 10:44 pm

    Yes, I believe your code will work correctly.

    You have additional columns in the query (description, ip_address, user_tag) and they are not needed.

    In fact, having them there will be misleading. Any value in the column will not make sense since those values have no meaning if you group them by month — unless they all have the same value for every record for the entire month!

    So for this reason, I’d recommend changing it to this:

    SELECT count(device_type) as devices, 
      DATE_FORMAT(LAST_UPDATE,"%Y-%m") as created_month 
    FROM ahrq_inventory_internal 
    GROUP BY created_month
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on flex dasboards and charting stuff. Till now I have build
I have an application that relies heavily on charting and currently the charts will
Just more asynchronous stuff! Alright, so I now have a working asynchronous socket program
I'm working with System.Windows.Forms.DataVisualization.Charting (C#, VS 2008). I have two ChartArea s, one containing
Working with C and Win32, I have a problem where my program freezes instead
I'm working with the ASP.NET Charting Library and I've got it generating a pie
I'm working with the Silverlight 4 toolkit and using the Charting control, specifically the
i have a problem. I am working on a chatting application. I want to
I'm working on some charting, and am currently using the Silverlight Toolkit. At the
i have a big problem here..i am using Microsoft charting controls in my asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.