Query Help

2010-10-27 Thread Nuno Mendes
I have 3 tables: (1) Companies, (2) locations and (3) employees: CREATE TABLE `companies` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(75) NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CREATE TABLE `locations ` ( `id` int(11) NOT NULL AUTO_INCREMENT,

Re: Query Help

2010-10-27 Thread Shawn Green (MySQL)
On 10/27/2010 6:55 AM, Nuno Mendes wrote: I have 3 tables: (1) Companies, (2) locations and (3) employees: CREATE TABLE `companies` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(75) NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CREATE TABLE `locations ` ( `id`

Selecting all minimum values

2010-10-27 Thread Matt Horrocks
Hi, I have the following table. How can I select the lowest `place` for each `query` for each `date` (some queries appear twice as they have a different `fullurl`). Thanks for your help. Matt [code] +---+---+++ | place | query

Re: Selecting all minimum values

2010-10-27 Thread Peter Brawley
Is this what you mean? select query, date, min(place) from tbl group by query, date; PB - On 10/27/2010 1:34 PM, Matt Horrocks wrote: Hi, I have the following table. How can I select the lowest `place` for each `query` for each `date` (some queries appear twice as they have a different

Alarms?

2010-10-27 Thread Camilo Uribe
What does it mean the section: Alarm status: Active alarms: 1 Max used alarms: 2 Next alarm time: 67 in http://dev.mysql.com/doc/refman/5.1/en/server-signal-response.html ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: SQL book recommendation?

2010-10-27 Thread wroxdb
2010/10/26 Philip Riebold p.rieb...@ucl.ac.uk: On 26 Oct 2010, at 11:49, MikeB wrote: I'm finding the MySQL online manuals hard going in figuring out how to construct SQL queries. Can anyone perhaps recommend a good book that can shed light on the subject? Thanks. The book I've been