SQL: How to select one record per day, assuming that each day contain more than 1 value MySQL
问题 I want to select records from '2013-04-01 00:00:00' to 'today' but, each day has lot of value, because they are saving each 15 minutes a value, so I want only the first or last value from each day. Table schema: CREATE TABLE IF NOT EXISTS `value_magnitudes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` float DEFAULT NULL, `magnitude_id` int(11) DEFAULT NULL, `sdi_belongs_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `reading_date` datetime DEFAULT NULL, `created_at` datetime