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 941217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:05:06+00:00 2026-05-15T22:05:06+00:00

i have some data at DB like: qty item id date 0001-0500 abcd 1

  • 0

i have some data at DB like:

qty       item  id  date
0001-0500 abcd  1   2010-06-22
0001-0500 abcd  2   2010-06-22
0001-0500 abcd  3   2010-06-22

i want some script can make them order by date and show result :

qty : 500 (it means 500-1=500,number 1 read 1-1 = 0)
item : abcd
id : 3 (counting from 1 until 3)
date :2010-06-22

qty    item     id   date
500    abcd     3     2010-06-22

i have tried like this:

'SELECT qty, item, COUNT(*) FROM inspec GROUP BY date';

before use the code above,i still confuse to make changes at :

qty       
0001-0500 
0001-0500      =>result become:qty : 500 (it means 500-1=500,number 1 read 1-1 = 0)
0001-0500
  • 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-05-15T22:05:07+00:00Added an answer on May 15, 2026 at 10:05 pm

    Sorting and counting can be (and I’d say usually are) done at the database level, using SQL. Otherwise, there are language constructs that can do the heavy lifting for you, again, called sort and count.

    If you’re using MySQL, the tutorial is a good place to start learning. For PHP, you might find this book helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data in my DB: Item date qty gum 2012-03-13 1 soap
I want to make one question about oracle/sql query. I have some data like
I have some data on my table like: DAY | QTY | Name 1/1/2010
I have some data, like this: BUG DATE STATUS ---- ---------------------- -------- 9012 18/03/2008
I have some data in .cvs. I would like to make a simple barplot
Say I have some data like this: number_stream = [0,0,0,7,8,0,0,2,5,6,10,11,10,13,5,0,1,0,...] I want to process
i want to show some data in percent. i have a mathematics formula like:
How can I select average of multiple columns? Suppose I have some data like:
I have some data like this : 1 TC1 PASS 2 TC2 FAIL 3
I have some data like this: -1,2752 -1,4735 1 -0,5500 1,3287 2 -1,6293 -2,1460

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.