I have a person table which holds person and his manager at the same time.I\'m using SELF JOIN to select managers email but I get a lot of duplicates.
CustIDNameReferredBy 1Neeta Sayam 2Dolly Dilly1 3Meena Kimi2 Find the names of all customers who are referred by others.
SOLVED All hail StackOverlow! While I was gone, people left 2 solutions (thanks guys--what is the protocol for handing out karma for two working solutions?)
I have a small database, holding the details of just under 400 ponies. I wish to query that table and return a table showing the pertinant details of each pony, and it\'s owner\'s and breeder\'s names
Does it get any simpler than this query? delete a.* from matches a inner join matches b ON (a.uid = b.matcheduid)
Sorry I couldn\'t think of a better way to title this. In Amazon\'s SimpleDB, an item can have multiple values in the same column, so it\'s possible to select only those items that have all of the att
I have two primary MySQL tables (profiles and contacts) with many supplementary tables (prefixed by prm_). They are accessed and manipulated via PHP.
I have a table in a mysql db as idfruitnumber_eatenday ---------------------------------- 1apple21 2banana11
I have question regarding SQL join for MySQL. Let suppose I have following table A and parent-child relation ship.How can I get all children (including sub children of children till leaf node)given p
I have a table that contains lots of integers. This table gets queried and the results end up being turned into xml. If the table contains for example the following items: