Re: Query Combining tables

2005-08-05 Thread Russell Horn
Thanks for the two incredibly fast responses, they were perfect - problem solved. Russell. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Query Combining tables

2005-08-05 Thread Philippe Poelvoorde
Russell Horn wrote: I'm having difficulty writing a query as follows. I'm unsure if I need a subquery, a union or if this isn't actually possible without using temporary tables. I have two tables for members. Table 1 (members) Table 2 (payments) +--++ +-+--

Re: Query Combining tables

2005-08-05 Thread Scott Noyes
Is this what you're after? SELECT COUNT(*) AS members, SUM(IF(payment_type = 'creditcard', 1, 0)) AS pay_by_card FROM members JOIN payments USING (memno) GROUP BY group; On 8/5/05, Russell Horn <[EMAIL PROTECTED]> wrote: > I'm having difficulty writing a query as follows. I'm unsure

Query Combining tables

2005-08-05 Thread Russell Horn
I'm having difficulty writing a query as follows. I'm unsure if I need a subquery, a union or if this isn't actually possible without using temporary tables. I have two tables for members. Table 1 (members) Table 2 (payments) +--++ +-+--+ | memno

Re: Combining tables

2003-12-18 Thread Dan Nelson
In the last episode (Dec 18), Arnoldus Th.J. Koeleman said: > I have a live feed datasource that inserts into 8 different tables( but > they are all the same layout only differennt regions) and i am not > allowed to change this since it is from a customer. > As with Oracle you can create a material

Combining tables

2003-12-18 Thread Arnoldus Th.J. Koeleman
I have a live feed datasource that inserts into 8 different tables( but they are all the same layout only differennt regions) and i am not allowed to change this since it is from a customer. As with Oracle you can create a materialized view that will combine those eight tables into one physical tab

combining tables

2003-01-09 Thread Matthew K. Gold
I have a MySQL database, and I have two tables that are causing me problems. One table, foo, contains the following fields: FooID FooFName FooLName The next table, foocontact, contains the following fields: FooContactID FooID FooEmail FooPhone FooAddress1 etc., etc. The problem I've had so far