Jeremiah Jester grouping and limiting results and rand()
Sep 23, 2013; 18:10
Jeremiah Jester
grouping and limiting results and rand()
Hello,
How would i go about selecting 5 random cars that are flagged as internet_special (value 1) for each dealer from a specific table? Ive tried sub selects with no luck. Here's a basic query that has my required conditional. Note that I get all unique dealers by doing a distinct(dealer_web_name). Make sense? Using mysql 5.
select dealer_web_name,id,internet_special,active from inventory where internet_special=1 and active=1;
Appreciate the help
Jj
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Sep 23
Peter Brawley Re: grouping and limiting results and rand()
Sep 23, 2013; 20:49
Peter Brawley
Re: grouping and limiting results and rand()
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!