RE: How can I count() on multiple tables in a single query? SOLVED

2004-07-12 Thread Daevid Vincent
nts.DeptID = UserDept.DeptID GROUP BY Departments.DeptID, Departments.DeptName ORDER BY DeptName DESC; > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, July 12, 2004 6:39 AM > To: Daevid Vincent > Cc: [EMAIL PROTECTED] > Subje

Re: How can I count() on multiple tables in a single query?

2004-07-12 Thread SGreen
| | Subject: How can I count() on multiple tables in a single query? | >

How can I count() on multiple tables in a single query?

2004-07-09 Thread Daevid Vincent
Using mysql v4.0.x on linux. Given three tables... CREATE TABLE Departments ( DeptID int(10) unsigned NOT NULL auto_increment, DeptName char(30) default NULL, PRIMARY KEY (DeptID) ) CREATE TABLE UserDept ( CoreID int(10) unsigned NOT NULL default '0', DeptID int(10) unsigned NOT NULL

RE: Count on Multiple Tables

2003-06-06 Thread Mike Hillyer
ph [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 10:33 AM To: Mike Hillyer; [EMAIL PROTECTED] Subject: RE: Count on Multiple Tables CREATE TABLE `affiliate_clickthroughs` ( `affiliate_clickthrough_id` int(11) NOT NULL auto_increment, `affiliate_id` int(11) NOT NULL default '0&#

RE: Count on Multiple Tables

2003-06-06 Thread Ralph
ng_status` int(5) NOT NULL default '0', `payment_date` datetime NOT NULL default '-00-00 00:00:00', `commission_percent` decimal(4,2) NOT NULL default '0.00', PRIMARY KEY (`affiliate_orders_id`) ) TYPE=MyISAM; -Original Message- From: Mike Hillyer [mailto:[EMAI

RE: Count on Multiple Tables

2003-06-06 Thread Mike Hillyer
00 PM To: [EMAIL PROTECTED] Subject: Count on Multiple Tables I've been stuck on this one all morning. Can't seem to figure it out. I have 2 tables, one with affiliate sales and another with affiliate clickthroughs. I have to query both tables, so that I can get clickthrough dates,

Count on Multiple Tables

2003-06-05 Thread Ralph
I've been stuck on this one all morning. Can't seem to figure it out. I have 2 tables, one with affiliate sales and another with affiliate clickthroughs. I have to query both tables, so that I can get clickthrough dates, hits, and then query affiliate sales table to get number of orders for each d