Re: Select w/ group by question

2010-07-14 Thread Scott Mullen
Peter Thanks for the link. I've never run across this page before, but it has tons of useful informationas well as several answers on how to implement what I was trying to do. Ended up going with a solution similar to this example (from the page you referenced): SELECT item, SUBSTR( MIN

RE: Select w/ group by question

2010-07-14 Thread Martin Gainty
> Date: Wed, 14 Jul 2010 10:25:22 -0400 > Subject: Select w/ group by question > From: smulle...@gmail.com > To: mysql@lists.mysql.com > > I'm having trouble formulating a query to gather the following data. I can > do this via a script, but now it is more or

Re: Select w/ group by question

2010-07-14 Thread Michael Satterwhite
On Wednesday, July 14, 2010 09:25:22 am Scott Mullen wrote: > I'm having trouble formulating a query to gather the following data. I can > do this via a script, but now it is more or less just bothering me if there > is an easy/efficient way to gather the following data from a single query. > > E

Re: Select w/ group by question

2010-07-14 Thread Peter Brawley
Scott, I would like to obtain the least cost of each product type and its associated vendor. See "Within-group aggregates" at http://www.artfulsoftware.com/infotree/queries.php. PB - On 7/14/2010 9:25 AM, Scott Mullen wrote: I'm having trouble formulating a query to gather the follo

Select w/ group by question

2010-07-14 Thread Scott Mullen
I'm having trouble formulating a query to gather the following data. I can do this via a script, but now it is more or less just bothering me if there is an easy/efficient way to gather the following data from a single query. Example Tables Products Type Cost Vendor_id -