Advertisement

07.04.2008 at 03:23AM PDT, ID: 23539150
[x]
Attachment Details

mysql SELECT DISTINCT on certain fields

Asked by cimmer in MySQL, SQL Query Syntax

Tags: mysql

I have a Mysql table full of statistics.
The statistics are gathered once a day.
There are 10 items.
9 of these are statistic numbers. The tenth item is the UNIX TIMESTAMP (seconds since epoch date)
Occasionally the 9 items are the same as the previous day.
When this occurs, I dont want the identical stats data from the previous day displayed but I do want the oldest timestamp displayed.

Is it possible to do a SELECT DISTINCT mysql query in a way that performs this?

It works perfect if I just SELECT DISTINCT the 9 items without the date but I need the date in there as well... It needs to be one query because the html table structure is populated based on the query results.
Start Free Trial
[+][-]07.04.2008 at 03:54AM PDT, ID: 21932264

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 05:43AM PDT, ID: 21932756

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 06:29AM PDT, ID: 21932999

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 06:52AM PDT, ID: 21933091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 01:03PM PDT, ID: 21934677

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 11:10AM PDT, ID: 21947270

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 11:15AM PDT, ID: 21947295

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 11:37AM PDT, ID: 21947459

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL, SQL Query Syntax
Tags: mysql
Sign Up Now!
Solution Provided By: mark_wills
Participating Experts: 5
Solution Grade: A
 
 
[+][-]07.08.2008 at 10:28PM PDT, ID: 21960795

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 01:26AM PDT, ID: 21961482

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628