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, al
elly [mailto:my...@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
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
> -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 ar
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 format_id = 13 despite not having a direct
link.
CREATE TABLE `dvds` (
`dvd_
: mysql@lists.mysql.com
> From: c...@hosting4days.com
> Subject: Basic SQL Query Help Needed
> Date: Tue, 25 Aug 2009 16:21:45 -0700
>
> I have a basic invoice table with related line items table
>
> Goal :I'd like to get ALL the related line items - for ALL the
>
I have a basic invoice table with related line items table
Goal :I'd like to get ALL the related line items - for ALL the
'open' invoices...
-- this should get a list of open (unpaid) invoices
$query_invoice = "SELECT DISTINCT ID from invoices where status =
'open'"
-
--
Friends,
I am developing a database for accounting software. I have one problem
regarding calculation of balances on daily basis for all ledgers. I am using
Access 2003 as frontend. While designing I found that maintaining of daily
balances is impossible to client's requirements. But as the soluti
>> 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 ta
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.
something
- 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, '-', predic
Hi,
Background: I run a prediction league for soccer
competitions. For every game, I want to show how many
predictions were submitted per scoreline, ie.
10% said 1-0
20% said 0-1
30% said 2-3
etc.
My prediction table has a predictionA and predicionB
column with the submitted scores.
Currently I
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| da
Hi,
I have this table where the columns and rows are organized like this:
+--+--+
| a| b|
+--+--+
|1 |1 |
|2 |1 |
|2 |2 |
|2 |3 |
|2 |4 |
|3 |1 |
|3 |2 |
+--+--+
I want to run a select that gives me one row fo
tec Support" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, July 27, 2003 2:05 AM
> Subject: Re: A little SQL query help
>
> > Hi Mark,
> >
> > 2003年 7月 27日 日曜日 06:09、Obantec Support さんは書きました:
> > > Hi
> > >
> > > I have a
- Original Message -
From: "Nils Valentin" <[EMAIL PROTECTED]>
To: "Obantec Support" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 27, 2003 2:05 AM
Subject: Re: A little SQL query help
> Hi Mark,
>
> 2003年 7月 27日 日曜日 06:09、Ob
Hi Ivan,
depending on mark's needs (orginal poster of the question), you might be
right. So far I have not so much experience with PHP.
Best regards
Nils Valentin
Tokyo/Japan
2003年 7月 27日 日曜日 15:43、Ivan Cukic さんは書きました:
> Nils> How about LIKE \"$%searchdata%\" ?
>
> The % sign should be in fr
Hi Mark,
2003年 7月 27日 日曜日 06:09、Obantec Support さんは書きました:
> Hi
>
> I have a database supplied to me that was excel but now uploaded to mysql.
> (the data is out of my hands.)
>
> i need to search for 1 of 2 categories against 3 fields with user inputted
> data.
>
> example Categories=Lessor , sear
Hi
I have a database supplied to me that was excel but now uploaded to mysql.
(the data is out of my hands.)
i need to search for 1 of 2 categories against 3 fields with user inputted
data.
example Categories=Lessor , searchtype = BusinessCity searchdata = (user
input)
$sql = "SELECT * FROM Con
Ben Balbo wrote:
Seems MySQL doesn't much like having nested joins in joins...
Oops! Sorry about that. (Curse me for a MySQL novice! )
However, your principles led me to my result. As the search page will
pass the class ids in anyway, I don't need to read these from the
table. I.E. I pass the
Hi Bruce,
Thanks for your reply. I just got the time to take a look at it, and
it makes sense. However, for the first test:
SELECT distinct t.name
FROM Teacher t
INNER JOIN (TeacherClass tc2 INNER JOIN Class c2 ON tc2.classid =
c2.id AND c2.name = 'English') ON t.teacherid = tc2.teac
Ben Balbo wrote:
Teacher (id, name, ...)
TeacherClass (teacherid, classid, timestamp)
Class (id, name, ...)
Now, what I'd really like to do it find all teachers who, for example,
taught Engligh and Math, but not Biology,
Here's a general, recursive, untested solution for you to play with.
We st
Hi all,
I've been trying to wrap my head round this problem for a few days
now, and have plenty of pieces of scrap paper with lines and arrows
and numbers to prove it.
Anyway, here's the scenario:
I have a table of teachers, and a table of classes. Any teacher can
have taught any class, and any
Hi all,
I've been trying to wrap my head round this problem for a few days
now, and have plenty of pieces of scrap paper with lines and arrows
and numbers to prove it.
Anyway, here's the scenario:
I have a table of teachers, and a table of classes. Any teacher can
have taught any class, and any
Apologies if you now get this three times now, but I haven't
received any copies through the mailing list yet, and the first 2 were
sent 3 and 4 hours ago.
I know email can go walkies for a few hours, but I've not been
experiencing any other mail problems, either personally or in
receiving MySQL m
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
>
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
orderdetail table with ordered, itemid and qty.
What I need to do is form
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
I know this is an off topic question, but wondered if anyone might have a
moment to help. I wouldn't ask if I could do a sub-select...
I am using mysql v3.23.51 and have a table I need to display the information
of users who are working in both category 3 and category 5.
Table def looks kind of
I've been trying to solve this problem for a couple of days now.
I've only started with DB's a month ago so I am no expert in SQL.
So, I present this problem to you guys in hopes of getting a solution.
Thanks in advance,
Mike
=
Question:
=
Using the query below I get the result
OK, I cannot find this sql query on the website or in any of my manuals.
I have a table that contains a set datatype eg
CREATE TABLE testjason (
ID int(11) NOT NULL auto_increment,
SomeSetColumn set('a','b','c') NOT NULL default '',
) TYPE=MyISAM;
I neet to perform an UPDATE on this ta
EMAIL 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
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 incl
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:
> The main problem is the layout and the order of the results set. I will
have
Neil [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:
>
>
+-+---+--+-+-+--
>
Stéphane,
> I have INVOICE table here is the layout:
>
>
+-+---+--+-+-+--
> --+
> | Field | Type | Null | Key | Default |
Extra
> |
>
+-+---+--+-+-+-
I have INVOICE table here is the layout:
+-+---+--+-+-+--
--+
| Field | Type | Null | Key | Default | Extra
|
+-+---+--+-+-+--
--+
| ID
* 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 tw
SQL QUERY question
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 parents)
I know, I know... this is not really an MySQL question but an ordinary SQL
question.. but I need help with it..
Lets say that I have a table called test that has 3 columns
test1,test2,test3 (what type they are are not interesting) columns test1 and
test2 makes the primary key
what I would like i
40 matches
Mail list logo