Histogram from tables.

2006-01-13 Thread Mike Martin
I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date) Gets me close, but to simplify plotting, I want to include

Help crafting an SELECT

2006-01-11 Thread Mike Martin
Hi List! Please forgive me if I'm asking the wrong list (and please guide me to the right place). I have two tables (simplified for this example) pics and tags like so: pics: picid photo 1Mustang 2Apple 3Rock 4Beetle tags: tagid picidtag 11 Car 21

Re: Help crafting an SELECT

2006-01-11 Thread Mike Martin
On 1/11/06, Gordon Bruce [EMAIL PROTECTED] wrote: I assume you are looking for both red and car. You can not use IN because that is implicitly an IN. You hae to join the tags table to itself using 2 different aliasis. {If you required 3 things then you would join it 3 times etc..} SELECT *