How about this?
WHERE `other_table`.`this_id` = `first_table`.`id`) AS 'count'
WHERE `first_table`.`progress` > 0;
Granted, you have not provided structure or names of the tables so this is
just my interpretation, but maybe something like this could give you a
> -----Original Message-----
> From: Michael Stroh [mailto:stroh@stripped]
> Sent: June 3, 2010 11:24 AM
> To: MySql
> Subject: Help needed on query on multiple tables
> Hi everyone. I'm trying to create a certain MySQL query but I'm not sure
> how to do it. Here is a stripped down version of the result I'm aiming
> I'm pretty new to queries that act on multiple tables, so apologize if
> is a very stupid question.
> I have one table (data) that has two columns (names and progress). I have
> second table (items) that has two columns (names and version). I'd like to
> do a query that produces the name of every record in data that has
> set to 0 and the number of records in the items table that have the same
> value in each table.names field.
> I can perform this by using two sets of queries, one that queries the data
> table and then loop through the names to do a count(names) query, but I'm
> not sure if I can somehow do it in one query.
> Thanks in advance!
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.829 / Virus Database: 271.1.1/2895 - Release Date: 06/03/10