Microsoft
Software
Hardware
Network
Question : Mysql Query to select from two tables
Greetings,
1st Query
SELECT id_r,sum(duration) FROM `main`.`calls`
where call_start > '2010-06-20 00:00:00' and call_start < '2010-06-20 23:59:59'
group by id_r;
Now id_r will be displayed who has made calls on 20-6-2010
Now I need to get their names .The names are not there in calls table.
2nd table is called desc
select * from `main`.`desc`;
This will display 2 coullmns.Id and names.
Now i need the names in first query.I mean to say I dont want to use two queries.As i am using mysql query browser.Also If no id_r has made calls i need that record also be displayed with null value.
Please let me know.
regards,
Answer : Mysql Query to select from two tables
My friend figured out a solution. Attached is the modified code he used. Thanks for your comments
Random Solutions
Is there a thin VMWare product, that doesn't require to be installed or something very less diskspace using?
Office 2010 Virtual Drive Q
Can i use Windows 2003 server OS on IBM RS6000 P520 Server hardware?
Get data from a table into individual rows. Excel macro, VBA
How to set DVD region in Linux using linux tools
Case-insensitive ISNUMBER(lLOOKUP) in Excel
iPhone and Macbook Calendar Sync
Coldfusion SQL how can i get the last bit field type with value 1 in the current row
Resource Forest Topology vs Single Forest/Single Domain
SQL Function Error - Cannot access temporary tables from within a function