Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Mark Kelly
Hi. On Friday 18 May 2012 18:21:07 Daevid Vincent wrote: Actually, I may have figured it out. Is there a better way to do this? I don't see why you need the dvds table when the dvd_id is in the scene table: SELECT a.dvd_id FROM scenes_list a, moviefiles b WHERE a.scene_id = b.scene_id AND

RE: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Daevid Vincent
...@wastedtimes.net] Sent: Saturday, May 19, 2012 3:34 PM To: mysql@lists.mysql.com Subject: Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format Hi. On Friday 18 May 2012 18:21:07 Daevid Vincent wrote: Actually, I may have figured it out. Is there a better

Re: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-19 Thread Baron Schwartz
I would work from the inside out. What you're doing is grouping scenes by DVD and throwing away the ones that have no scenes. If you start with DVDs and do a subquery for each row, you'll process DVDs without scenes and then filter them out. If you start with a subquery that's grouped by DVD ID,

RE: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-18 Thread Daevid Vincent
-Original Message- Sent: Friday, May 18, 2012 5:34 PM I have a table of DVDs, another of scenes and a last one of encoding formats/files... I want to find in one query all the dvd_id that have 0 scene_id that's encoded in format_id = 13. In other words all DVDs that are

Re: SQL Query help

2004-02-19 Thread unix
This is probably tediously basic for all you super whiz MySQL people but help me out if you can. I have 2 tables in my database (there will be more) table_Applics table_keywords I want to select columns of information from table_applics based on the ID results from table_keywords.

Re: SQL query help required

2004-02-03 Thread Jigal van Hemert
- Original Message - From: Riaan Oberholzer [EMAIL PROTECTED] 2-0, 2-1, 2-2, 2-3 1-0, 1-1, 1-2, 1-3 0-0, 0-1, 0-2, 0-3 SELECT CONCAT(predictionA, '-', predictionB) AS score, COUNT(CONCAT(predictionA, '-', predictionB)) AS count FROM table WHERE CONCAT(predictionA, '-', predictionB)

Re: SQL query help

2003-10-02 Thread Svein E. Seldal
Hi, I forgot to mention that the table contains more information, it has more columns than just a and b. These extra columns contains the actual information that I'm looking for. I.e. the mentioned table could be looking like this: +--+--+--+--+-+--- | a| b|

Re: SQL Query Help

2002-10-04 Thread Shane Allen
On Fri, Oct 04, 2002 at 12:36:30PM -0700, David McInnis wrote: Can someone please help me with the following? Normally I would do this with a nested select, but since this is not available in MySQL I think I need help. Here is what I have: An order table with sales tax total and an

Re: SQL query help

2002-07-13 Thread Erick Papadakis
Hi Craig, you wrote--- select B.name,C.name from lookuptable A, user B, cat C where A.user = B.id and A.category = C.id and A.category in (3,5); The problem I see is that records come back where a user is in category 3 or category 5. How do I limit records

RE: SQL Query Help

2002-04-03 Thread Danis Stéphane (NHQ-AC)
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 3:47 PM To: Danis Stéphane (NHQ-AC); [EMAIL PROTECTED] Subject: Re: SQL Query Help Stéphane, I have INVOICE table here is the layout: +-+---+--+-+-+-- --+ | Field

Re: SQL Query Help

2002-04-03 Thread denonymous
From: Danis Stéphane (NHQ-AC) [EMAIL PROTECTED] My best code is this: SELECT SUM(invoice_amount), state, statement_date FROM invoice GROUP BY state, statement_date The results are have followed: snip The main problem is the layout and the order of the results set. I will have 9 state

Re: SQL Query Help

2002-04-03 Thread DL Neil
Stéphane, Answers: There are nine different states (and there are 12 months). * The main problem is the layout and the order of the results set. I will have 9 state (provinces) and I would prefer the month to be the columns. The ideal results would look like this, Please note I have only

RE: SQL Query Help

2002-04-03 Thread Danis Stéphane (NHQ-AC)
PROTECTED] Subject: Re: SQL Query Help Stéphane, Have just re-read my response... * The main problem is the layout and the order of the results set. I will have 9 state (provinces) and I would prefer the month to be the columns. The ideal results would look like this, Please note I have only

Re: SQL Query Help

2002-04-02 Thread DL Neil
Stéphane, I have INVOICE table here is the layout: +-+---+--+-+-+-- --+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+--

RE: SQL QUERY help joining three tables

2002-03-16 Thread Roger Baklund
* John Hughes I have three tables: students has student_id and student_name parents has parent_id and parent_name parentlog has student_id and parent_id I want to search the parentlog WHERE student_id = some_id GROUP BY parent_id (This will bring back two rows when there are two