Re: Are equi-joins faster than left joins?

2009-04-05 Thread Martijn Tonies
I have 3 tables that are 1:1 and will always have a row for a given product,_code date. If I want to join them together, is it going to be faster to use an equi join or a left join, or does it matter? Who cares, they are -different- things symantically, use the correct type of join for

One to many relationship

2009-04-05 Thread abdulazeez alugo
Hello all, I'm trying to design a relational database where two tables link to each other through unique id sa below Table 1 table1_id INT UNSIGNED NOT NULL AUTO INCREMENT, entrydate TIMESTAMP Table2 table2_id INT UNSIGNED NOT NULL AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL,

how to join tables on multiple conditions for same column

2009-04-05 Thread PJ
I am trying to select names from a list which depends on another table for their ranking. I want to retrieve all names that start with a Capital letter in last_name and ranking of 1 and any other names that have a ranking of 2 but are both related to a third table. tables: book(id,...etc.),

multi crosstab

2009-04-05 Thread Rodrigo Aliste P.
Hi Devs I have a tricky question and I want to know if its possible to accomplish it on mysql and how. The following query: SELECT fields.id AS field_id, data.user_id, fields.type, fields.name, data.value, entries.ip, entries.date, entries.user_agent FROM

Re: multi crosstab

2009-04-05 Thread Rodrigo Aliste P.
I think I acompplish it! Merge that query into a view called report_1 and then: (1) SELECT user_id, MAX(IF(name='RUT',value,NULL)) AS 'Rut', MAX(IF(name='Name',value,NULL)) AS 'Name' FROM report_1 GROUP BY user_id; +-+---++ | user_id | Rut | Name |