Advertisement

07.23.2008 at 03:56PM PDT, ID: 23590489
[x]
Attachment Details

Why does this query produce an error?

Asked by Flashbiter in MySQL Server, SQL Query Syntax

This one is really simple folks. I don't have a lot of SQL knowledge, so could you please tell me why this SQL query results in a syntax error? Basically it's a table of bids a user can make for items. Each item has a unique position, but new bids are made every week. What I want is to get a list that tells me for each position the highest bid for that position in a particular week. MySQL seems to have some trouble with the "WHERE" part of the query.Start Free Trial
1:
SELECT *,MAX(bid_amount) AS max_bid FROM `bids` WHERE (starting = '2008-07-28 00:00:00') GROUP BY position
[+][-]07.23.2008 at 05:13PM PDT, ID: 22075098

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.23.2008 at 05:26PM PDT, ID: 22075181

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.23.2008 at 11:15PM PDT, ID: 22076446

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.23.2008 at 11:38PM PDT, ID: 22076539

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.23.2008 at 11:46PM PDT, ID: 22076562

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 Server, SQL Query Syntax
Sign Up Now!
Solution Provided By: Flashbiter
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628