Re: Convert Subquery - need to find max of a set

2005-10-14 Thread Kristen G. Thorson
[EMAIL PROTECTED] wrote: "Kristen G. Thorson" <[EMAIL PROTECTED]> wrote on 10/14/2005 09:15:21 AM: I need to convert this query into one without a subquery: SELECT r.selector_forms_results_max_points AS points, r.selector_forms_results_description AS description, FROM selector_forms

Re: Convert Subquery - need to find max of a set

2005-10-14 Thread SGreen
"Kristen G. Thorson" <[EMAIL PROTECTED]> wrote on 10/14/2005 09:15:21 AM: > I need to convert this query into one without a subquery: > > SELECT > r.selector_forms_results_max_points AS points, > r.selector_forms_results_description AS description, > FROM selector_forms_results AS r > WH

Convert Subquery - need to find max of a set

2005-10-14 Thread Kristen G. Thorson
I need to convert this query into one without a subquery: SELECT r.selector_forms_results_max_points AS points, r.selector_forms_results_description AS description, FROM selector_forms_results AS r WHERE r.selector_forms_id = 1 AND r.selector_forms_results_max_points = ( SELECT DI

Re: Convert subquery

2005-05-17 Thread Jan Pieter Kunst
2005/5/17, Kristen G. Thorson <[EMAIL PROTECTED]>: > I actually had something similar to this at one point, but I never got it > working. Your query returned 148 rows, which I can tell you right away > can't be right since there are only 130 items in `page`. I believe the > problem is that it do

Re: Convert subquery

2005-05-17 Thread Kristen G. Thorson
I actually had something similar to this at one point, but I never got it working. Your query returned 148 rows, which I can tell you right away can't be right since there are only 130 items in `page`. I believe the problem is that it doesn't take into account that a page may be a child page

Re: Convert subquery

2005-05-17 Thread Kristen G. Thorson
Shawn, Thanks so much, this is exactly what I was looking for. I was having trouble getting the condition (page_links.page_id=6) in the right place. I had gotten as far as SELECT page.page_id, page_keyword FROM page LEFT JOIN page_links ON page.page_id=page_links.child_id WHERE page.page_id<>6

Re: Convert subquery

2005-05-17 Thread Jan Pieter Kunst
2005/5/17, Kristen G. Thorson <[EMAIL PROTECTED]>: > I am moving some code that was developed against MySQL 4.1 to a server > with 3.23, and I have one query that uses a subquery. I'm having a bear > of a time wrapping my mind around how to convert this. The original > query is this: > > SELECT

Re: Convert subquery

2005-05-17 Thread SGreen
"Kristen G. Thorson" <[EMAIL PROTECTED]> wrote on 05/17/2005 02:37:12 PM: > I am moving some code that was developed against MySQL 4.1 to a server > with 3.23, and I have one query that uses a subquery. I'm having a bear > of a time wrapping my mind around how to convert this. The original

Convert subquery

2005-05-17 Thread Kristen G. Thorson
I am moving some code that was developed against MySQL 4.1 to a server with 3.23, and I have one query that uses a subquery. I'm having a bear of a time wrapping my mind around how to convert this. The original query is this: SELECT page.page_id, page.page_keyword FROM page WHERE page.page_id