Search Results

Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: cgyrob ; Forum: MySQL and child forums
Forum: MySQL Oct 8th, 2009
Replies: 2
Views: 401
Posted By cgyrob
Try this


Select a,b,c,d,e,f from
(
(SELECT a, b, c, d, e, f, DATE
FROM table1 WHERE a=10 AND b=1)
UNION
(SELECT a, b, c, d, e, f, DATE
FROM table1 WHERE a=11 AND b=1)
Forum: MySQL Aug 10th, 2009
Replies: 3
Views: 398
Posted By cgyrob
Glad I could help. Can you mark the thread solved if your problem has been fixed.

Thanks.
Forum: MySQL Aug 7th, 2009
Replies: 3
Views: 398
Posted By cgyrob
The first thing you need to do is replace the left join with an Inner join. Right now you are joining all the customers even if they do not have any orders which is a waste of resources when you are...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 625
Posted By cgyrob
Try this


SELECT MAKE.MAKE, MAKE.count, color.Color, color.count
FROM(
SELECT MAKE, count(*)count
FROM cars
Group by MAKE
)MAKE,
( SELECT MAKE, color,...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 625
Posted By cgyrob
Nevermind, I take it the attachment is the table schema.

Is it important to do it all in one query. What are you using the resultset for because if you do it in one query you will most likely get...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 625
Posted By cgyrob
Since you didn't give too much information I thought of a few other interpetations of what you asked.

If field1 is a numeric value you might want the sum of the field grouped by field2


Select...
Forum: MySQL Jul 21st, 2009
Replies: 8
Views: 625
Posted By cgyrob
do you mean something like this


Select field2,count(Field1)
From Table
Group by field2
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC