Esta es la cuarta entrega donde muestro ejercicios propuestos con su respectiva solución para practicar consultas SQL usando el gestor MySQL o MariaDB. Básicamente se proponen algunos ejercicios de consultas sobre un banco de datos ya definido, y luego se resuelven.
La primera parte está aquí, la segunda aquí y la tercera aquí. Hoy vamos a ver algunas consultas y vamos a trabajar con datos de temperatura y humedad por fecha y hora que recogimos usando el sensor DHT22.
Entre algunas funciones que veremos está MAX, MIN, IF, AVG, SUBSTR y las operaciones usando WHERE, ORDER BY, DISTINCT y LIMIT. Verás que será muy entretenido y que sacaremos algunos ejercicios de todos estos datos.
Datos de la tabla
Como te dije anteriormente, vamos a usar datos de medición de temperatura y humedad. La tabla tiene un id, temperatura, nivel de humedad y la fecha y hora del registro.
Puedes importarlo usando phpmyadmin, copiando y pegando o usando cualquier forma que tú conozcas.
-- MariaDB dump 10.17 Distrib 10.4.11-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: dht_log
-- ------------------------------------------------------
-- Server version 10.4.11-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `dht_log`
--
DROP TABLE IF EXISTS `dht_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dht_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` varchar(19) NOT NULL,
`temperature` decimal(5,2) NOT NULL,
`humidity` decimal(5,2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4457 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `dht_log`
--
LOCK TABLES `dht_log` WRITE;
/*!40000 ALTER TABLE `dht_log` DISABLE KEYS */;
INSERT INTO `dht_log` VALUES (4024,'2020-12-23 20:14:20',19.30,56.10),(4025,'2020-12-23 20:14:51',19.10,57.80),(4026,'2020-12-23 20:15:21',18.80,58.60),(4027,'2020-12-23 20:15:52',18.60,58.00),(4028,'2020-12-23 20:16:22',18.40,59.00),(4029,'2020-12-23 20:16:52',18.30,59.80),(4030,'2020-12-23 20:17:22',17.90,60.60),(4031,'2020-12-23 20:17:53',18.00,61.00),(4032,'2020-12-23 20:18:23',18.00,61.60),(4033,'2020-12-23 20:18:54',17.90,61.90),(4034,'2020-12-23 20:19:24',17.80,61.80),(4035,'2020-12-23 20:19:55',17.70,62.20),(4036,'2020-12-23 20:20:25',17.60,62.50),(4037,'2020-12-23 20:20:56',17.50,62.30),(4038,'2020-12-23 20:21:26',17.50,62.50),(4039,'2020-12-23 20:21:56',17.40,62.90),(4040,'2020-12-23 20:22:26',17.40,62.90),(4041,'2020-12-23 20:22:57',17.40,62.70),(4042,'2020-12-23 20:23:27',17.30,63.10),(4043,'2020-12-23 20:23:57',17.20,64.20),(4044,'2020-12-23 20:24:28',17.20,64.30),(4045,'2020-12-23 20:24:58',17.10,64.40),(4046,'2020-12-23 20:25:28',17.20,64.40),(4047,'2020-12-23 20:25:59',17.00,64.00),(4048,'2020-12-23 20:26:29',17.00,64.20),(4049,'2020-12-23 20:26:59',17.00,64.60),(4050,'2020-12-23 20:27:30',17.00,65.90),(4051,'2020-12-23 20:28:00',17.00,65.10),(4052,'2020-12-23 20:28:30',17.00,65.40),(4053,'2020-12-23 20:29:00',17.10,67.60),(4054,'2020-12-23 20:29:31',17.10,68.50),(4055,'2020-12-23 20:30:01',17.20,68.60),(4056,'2020-12-23 20:30:31',17.30,69.30),(4057,'2020-12-23 20:31:02',17.30,69.70),(4058,'2020-12-23 20:31:32',17.40,69.80),(4059,'2020-12-23 20:32:02',17.40,69.80),(4060,'2020-12-23 20:32:33',17.40,69.60),(4061,'2020-12-23 20:33:03',17.40,70.50),(4062,'2020-12-23 20:33:33',17.40,69.90),(4063,'2020-12-23 20:34:03',17.50,70.20),(4064,'2020-12-23 20:34:34',17.50,70.60),(4065,'2020-12-23 20:35:04',17.50,70.30),(4066,'2020-12-23 20:35:34',17.60,71.20),(4067,'2020-12-23 20:36:05',17.60,70.90),(4068,'2020-12-23 20:36:35',17.60,71.10),(4069,'2020-12-23 20:37:05',17.60,71.30),(4070,'2020-12-23 20:37:36',17.70,72.20),(4071,'2020-12-23 20:38:06',17.70,72.00),(4072,'2020-12-23 20:38:36',17.70,71.70),(4073,'2020-12-23 20:39:07',17.70,72.10),(4074,'2020-12-23 20:39:37',17.70,72.40),(4075,'2020-12-23 20:40:07',17.70,72.50),(4076,'2020-12-23 20:40:37',17.70,72.90),(4077,'2020-12-23 20:41:08',17.70,73.10),(4078,'2020-12-23 20:41:38',17.70,73.50),(4079,'2020-12-23 20:42:08',17.70,73.60),(4080,'2020-12-23 20:42:39',17.70,73.70),(4081,'2020-12-23 20:43:09',17.70,73.70),(4082,'2020-12-23 21:17:05',17.90,74.40),(4083,'2020-12-23 21:17:35',17.90,75.90),(4084,'2020-12-23 21:18:06',18.10,76.00),(4085,'2020-12-23 21:18:36',17.70,76.00),(4086,'2020-12-23 21:19:06',17.80,76.40),(4087,'2020-12-23 21:19:37',18.00,76.30),(4088,'2020-12-23 21:20:07',18.00,76.40),(4089,'2020-12-23 21:20:37',18.00,76.40),(4090,'2020-12-23 21:21:08',18.00,76.60),(4091,'2020-12-23 21:21:38',18.30,76.80),(4092,'2020-12-23 21:22:08',18.00,76.70),(4093,'2020-12-23 21:22:39',18.00,76.40),(4094,'2020-12-23 21:23:09',18.00,76.30),(4095,'2020-12-23 21:23:39',18.00,76.50),(4096,'2020-12-23 21:24:09',17.70,76.30),(4097,'2020-12-23 21:24:40',17.90,76.90),(4098,'2020-12-23 21:25:10',17.90,76.80),(4099,'2020-12-23 21:25:40',17.90,77.00),(4100,'2020-12-23 21:26:11',17.80,77.00),(4101,'2020-12-23 21:26:41',18.40,76.80),(4102,'2020-12-23 21:27:11',17.30,76.60),(4103,'2020-12-23 21:27:42',17.90,77.20),(4104,'2020-12-23 21:28:12',17.80,77.00),(4105,'2020-12-23 21:28:42',18.10,74.80),(4106,'2020-12-23 21:29:12',17.40,70.90),(4107,'2020-12-23 21:29:43',17.50,68.40),(4108,'2020-12-23 21:30:13',17.60,67.60),(4109,'2020-12-23 21:30:43',17.50,68.60),(4110,'2020-12-23 21:31:14',17.40,68.50),(4111,'2020-12-23 21:31:44',17.40,68.00),(4112,'2020-12-23 21:32:14',17.10,68.00),(4113,'2020-12-23 21:32:45',17.30,69.90),(4114,'2020-12-23 21:33:15',17.20,70.10),(4115,'2020-12-23 21:33:45',18.40,71.70),(4116,'2020-12-23 21:34:16',17.40,71.80),(4117,'2020-12-23 21:34:46',17.40,72.40),(4118,'2020-12-23 21:35:16',17.50,72.20),(4119,'2020-12-23 21:35:47',17.50,72.40),(4120,'2020-12-23 21:36:17',17.50,72.30),(4121,'2020-12-23 21:36:47',17.50,72.10),(4122,'2020-12-23 21:37:17',17.60,72.20),(4123,'2020-12-23 21:37:48',17.60,72.70),(4124,'2020-12-23 21:38:18',17.70,73.00),(4125,'2020-12-23 21:38:48',17.60,72.50),(4126,'2020-12-23 21:39:19',17.60,73.60),(4127,'2020-12-23 21:39:49',17.60,72.40),(4128,'2020-12-23 21:40:19',17.60,72.30),(4129,'2020-12-23 21:40:49',17.60,73.10),(4130,'2020-12-23 21:41:20',17.60,73.70),(4131,'2020-12-23 21:41:50',17.60,73.70),(4132,'2020-12-23 21:42:20',17.50,73.30),(4133,'2020-12-23 21:42:51',17.50,74.20),(4134,'2020-12-23 21:43:21',17.50,74.10),(4135,'2020-12-23 21:43:51',17.50,74.00),(4136,'2020-12-23 21:44:22',17.50,74.50),(4137,'2020-12-23 21:44:52',17.50,74.60),(4138,'2020-12-23 21:45:22',17.50,74.40),(4139,'2020-12-23 21:45:53',17.50,74.80),(4140,'2020-12-23 21:46:23',17.50,74.60),(4141,'2020-12-23 21:46:53',17.50,74.20),(4142,'2020-12-23 21:47:24',17.40,75.20),(4143,'2020-12-23 21:47:54',17.40,75.40),(4144,'2020-12-23 21:48:24',17.30,75.20),(4145,'2020-12-23 21:48:54',17.40,75.40),(4146,'2020-12-23 21:49:25',17.40,75.10),(4147,'2020-12-23 21:49:55',17.40,75.30),(4148,'2020-12-23 21:50:25',17.40,75.60),(4149,'2020-12-23 21:50:56',17.40,75.70),(4150,'2020-12-23 21:51:26',17.40,75.70),(4151,'2020-12-23 21:51:56',17.40,75.70),(4152,'2020-12-23 21:52:27',17.40,75.60),(4153,'2020-12-23 21:52:57',17.30,73.40),(4154,'2020-12-23 21:53:27',17.30,72.70),(4155,'2020-12-23 21:53:57',17.30,73.70),(4156,'2020-12-23 21:54:28',17.30,73.80),(4157,'2020-12-23 21:55:01',17.30,73.40),(4158,'2020-12-23 21:55:31',17.40,74.00),(4159,'2020-12-23 21:56:02',17.30,73.50),(4160,'2020-12-23 21:56:32',17.30,71.50),(4161,'2020-12-23 21:57:02',17.30,71.80),(4162,'2020-12-23 21:57:33',17.30,70.70),(4163,'2020-12-23 21:58:03',17.30,70.80),(4164,'2020-12-23 21:58:33',17.30,71.10),(4165,'2020-12-23 21:59:03',17.40,70.60),(4166,'2020-12-23 21:59:34',17.30,69.20),(4167,'2020-12-23 22:00:04',17.30,69.10),(4168,'2020-12-23 22:00:34',17.30,68.00),(4169,'2020-12-23 22:01:05',17.30,67.90),(4170,'2020-12-23 22:01:35',17.30,67.40),(4171,'2020-12-23 22:02:05',17.20,67.50),(4172,'2020-12-23 22:02:36',17.20,67.60),(4173,'2020-12-23 22:03:06',17.10,68.60),(4174,'2020-12-23 22:03:36',17.10,69.30),(4175,'2020-12-23 22:04:07',17.20,70.40),(4176,'2020-12-23 22:04:37',17.20,70.90),(4177,'2020-12-23 22:05:07',17.20,70.80),(4178,'2020-12-23 22:05:38',17.20,68.90),(4179,'2020-12-23 22:06:08',17.20,69.60),(4180,'2020-12-23 22:06:38',17.20,69.40),(4181,'2020-12-23 22:07:09',17.20,69.20),(4182,'2020-12-23 22:07:39',17.20,68.20),(4183,'2020-12-23 22:08:09',17.10,68.40),(4184,'2020-12-23 22:08:39',17.10,68.30),(4185,'2020-12-23 22:09:10',17.10,68.60),(4186,'2020-12-23 22:09:40',17.10,69.00),(4187,'2020-12-23 22:10:10',17.10,68.90),(4188,'2020-12-23 22:10:41',17.10,69.90),(4189,'2020-12-23 22:11:11',17.10,70.20),(4190,'2020-12-23 22:11:41',17.10,69.60),(4191,'2020-12-23 22:12:12',17.10,69.20),(4192,'2020-12-23 22:12:42',17.10,68.60),(4193,'2020-12-23 22:13:12',17.10,68.80),(4194,'2020-12-23 22:13:43',17.10,68.50),(4195,'2020-12-23 22:14:13',17.10,68.00),(4196,'2020-12-23 22:14:43',17.10,68.30),(4197,'2020-12-23 22:15:14',17.10,68.70),(4198,'2020-12-23 22:15:44',17.00,68.40),(4199,'2020-12-23 22:16:14',17.10,68.80),(4200,'2020-12-23 22:16:44',17.10,69.60),(4201,'2020-12-23 22:17:18',17.10,71.00),(4202,'2020-12-23 22:17:48',17.00,67.50),(4203,'2020-12-23 22:18:21',17.10,66.00),(4204,'2020-12-23 22:18:51',17.00,67.90),(4205,'2020-12-23 22:19:22',17.00,68.80),(4206,'2020-12-23 22:19:52',16.90,69.70),(4207,'2020-12-23 22:20:22',17.00,69.40),(4208,'2020-12-23 22:20:53',16.90,70.50),(4209,'2020-12-23 22:21:23',17.00,71.90),(4210,'2020-12-23 22:21:53',16.60,70.00),(4211,'2020-12-23 22:22:23',16.90,69.40),(4212,'2020-12-23 22:22:54',16.90,69.20),(4213,'2020-12-23 22:23:24',16.70,69.80),(4214,'2020-12-23 22:23:54',16.80,68.80),(4215,'2020-12-23 22:24:25',16.80,67.50),(4216,'2020-12-23 22:24:55',16.80,67.50),(4217,'2020-12-23 22:25:26',16.30,68.00),(4218,'2020-12-23 22:25:56',16.70,69.00),(4219,'2020-12-23 22:26:26',16.70,70.10),(4220,'2020-12-23 22:26:57',16.80,71.30),(4221,'2020-12-23 22:27:27',16.80,71.70),(4222,'2020-12-23 22:27:57',17.00,72.60),(4223,'2020-12-23 22:28:27',16.90,73.70),(4224,'2020-12-23 22:28:58',17.30,73.90),(4225,'2020-12-23 22:29:28',17.30,73.50),(4226,'2020-12-23 22:29:58',17.30,72.20),(4227,'2020-12-23 22:30:31',17.40,72.50),(4228,'2020-12-23 22:31:02',17.30,72.40),(4229,'2020-12-23 22:31:32',17.20,72.90),(4230,'2020-12-23 22:32:02',17.20,73.60),(4231,'2020-12-23 22:32:35',17.30,73.80),(4232,'2020-12-23 22:33:06',17.50,73.90),(4233,'2020-12-23 22:33:36',17.10,75.00),(4234,'2020-12-23 22:34:06',17.30,74.90),(4235,'2020-12-23 22:34:40',17.20,74.80),(4236,'2020-12-23 22:35:10',17.30,74.70),(4237,'2020-12-23 22:35:40',17.20,77.30),(4238,'2020-12-23 22:36:11',17.50,75.10),(4239,'2020-12-23 22:36:41',17.20,74.80),(4240,'2020-12-23 22:37:11',17.50,75.10),(4241,'2020-12-23 22:37:41',17.30,75.70),(4242,'2020-12-23 22:38:12',17.40,75.30),(4243,'2020-12-23 22:38:42',17.40,75.10),(4244,'2020-12-23 22:39:12',17.40,75.30),(4245,'2020-12-23 22:39:43',17.90,75.90),(4246,'2020-12-23 22:40:13',17.40,76.10),(4247,'2020-12-23 22:40:43',17.70,76.20),(4248,'2020-12-23 22:41:14',17.40,76.10),(4249,'2020-12-23 22:41:44',17.40,75.90),(4250,'2020-12-23 22:42:14',17.40,76.10),(4251,'2020-12-23 22:42:45',17.10,76.20),(4252,'2020-12-23 22:43:15',17.60,77.20),(4253,'2020-12-23 22:43:45',17.50,76.50),(4254,'2020-12-23 22:44:16',17.30,76.70),(4255,'2020-12-23 22:44:46',17.30,76.70),(4256,'2020-12-23 22:45:16',17.30,77.00),(4257,'2020-12-23 22:45:47',17.30,77.00),(4258,'2020-12-23 22:46:17',17.60,77.40),(4259,'2020-12-23 22:46:47',17.40,77.00),(4260,'2020-12-23 22:47:18',17.50,77.00),(4261,'2020-12-23 22:47:48',17.40,76.80),(4262,'2020-12-23 22:48:21',17.50,77.10),(4263,'2020-12-23 22:48:51',17.70,77.20),(4264,'2020-12-23 22:49:21',17.50,77.10),(4265,'2020-12-23 22:49:52',17.60,77.10),(4266,'2020-12-23 22:50:22',17.50,77.50),(4267,'2020-12-23 22:50:52',17.50,77.30),(4268,'2020-12-23 22:51:23',18.30,77.80),(4269,'2020-12-23 22:51:53',17.50,77.30),(4270,'2020-12-23 22:52:23',17.50,77.70),(4271,'2020-12-23 22:52:54',17.60,77.70),(4272,'2020-12-23 22:59:02',17.60,78.00),(4273,'2020-12-23 22:59:33',17.90,79.60),(4274,'2020-12-23 23:00:03',17.90,78.10),(4275,'2020-12-23 23:00:33',17.70,77.50),(4276,'2020-12-23 23:01:04',17.90,77.50),(4277,'2020-12-23 23:01:34',17.90,77.20),(4278,'2020-12-23 23:02:04',17.90,77.40),(4279,'2020-12-23 23:02:34',17.90,77.90),(4280,'2020-12-23 23:03:05',17.90,78.10),(4281,'2020-12-23 23:03:35',17.90,78.00),(4282,'2020-12-23 23:04:05',17.90,79.00),(4283,'2020-12-23 23:04:36',17.90,78.80),(4284,'2020-12-23 23:05:06',17.80,78.10),(4285,'2020-12-23 23:05:36',17.90,78.00),(4286,'2020-12-23 23:06:07',17.90,77.80),(4287,'2020-12-23 23:06:37',17.80,78.30),(4288,'2020-12-23 23:07:07',17.70,78.50),(4289,'2020-12-23 23:07:38',17.70,78.90),(4290,'2020-12-23 23:08:08',17.80,78.90),(4291,'2020-12-23 23:08:38',17.60,78.80),(4292,'2020-12-24 08:45:21',17.10,78.60),(4293,'2020-12-24 08:45:51',15.30,91.60),(4294,'2020-12-24 08:46:22',15.30,91.90),(4295,'2020-12-24 08:46:52',15.40,91.20),(4296,'2020-12-24 08:47:23',15.30,90.50),(4297,'2020-12-24 08:47:54',15.30,90.10),(4298,'2020-12-24 08:48:24',15.40,90.20),(4299,'2020-12-24 08:48:54',15.40,90.20),(4300,'2020-12-24 08:49:24',15.40,90.30),(4301,'2020-12-24 08:49:55',15.40,90.20),(4302,'2020-12-24 08:50:25',15.40,90.00),(4303,'2020-12-24 08:51:31',15.40,90.00),(4304,'2020-12-24 08:52:01',15.30,90.10),(4305,'2020-12-24 08:52:31',15.30,90.00),(4306,'2020-12-24 08:53:02',15.20,90.00),(4307,'2020-12-24 08:53:32',15.20,90.00),(4308,'2020-12-24 08:54:02',15.20,90.10),(4309,'2020-12-24 08:54:33',15.10,90.20),(4310,'2020-12-24 08:55:03',15.10,90.10),(4311,'2020-12-24 08:55:33',15.10,90.10),(4312,'2020-12-24 08:56:04',15.10,90.40),(4313,'2020-12-24 08:56:35',15.10,90.60),(4314,'2020-12-24 08:57:05',15.20,90.40),(4315,'2020-12-24 08:57:36',15.20,90.60),(4316,'2020-12-24 08:58:06',15.20,90.50),(4317,'2020-12-24 08:58:36',15.30,90.90),(4318,'2020-12-24 08:59:06',15.30,90.80),(4319,'2020-12-24 08:59:37',15.30,91.30),(4320,'2020-12-24 09:00:07',15.40,90.90),(4321,'2020-12-24 09:00:37',15.40,90.40),(4322,'2020-12-24 09:01:08',15.40,90.40),(4323,'2020-12-24 09:01:38',15.40,90.60),(4324,'2020-12-24 09:02:08',15.40,90.70),(4325,'2020-12-24 09:02:39',15.40,90.50),(4326,'2020-12-24 09:03:10',15.40,91.30),(4327,'2020-12-24 09:03:40',15.40,90.90),(4328,'2020-12-24 09:04:11',15.40,90.80),(4329,'2020-12-24 09:04:41',15.30,90.40),(4330,'2020-12-24 09:05:11',15.20,89.60),(4331,'2020-12-24 09:05:42',15.20,90.50),(4332,'2020-12-24 09:06:12',15.20,90.10),(4333,'2020-12-24 09:06:42',15.20,90.20),(4334,'2020-12-24 09:07:13',15.30,89.90),(4335,'2020-12-24 09:07:49',15.40,89.80),(4336,'2020-12-24 09:08:19',15.30,90.40),(4337,'2020-12-24 09:08:49',15.20,90.10),(4338,'2020-12-24 09:09:19',15.10,90.00),(4339,'2020-12-24 09:09:49',15.10,89.80),(4340,'2020-12-24 09:10:21',15.10,90.70),(4341,'2020-12-24 09:10:51',15.20,90.30),(4342,'2020-12-24 09:11:21',15.20,90.50),(4343,'2020-12-24 09:11:51',15.30,90.50),(4344,'2020-12-24 09:12:22',15.20,90.40),(4345,'2020-12-24 09:12:52',15.30,90.40),(4346,'2020-12-24 09:13:23',15.30,90.10),(4347,'2020-12-24 09:13:53',15.40,90.40),(4348,'2020-12-24 09:14:23',15.40,90.40),(4349,'2020-12-24 09:14:53',15.30,90.10),(4350,'2020-12-24 09:15:27',15.30,89.40),(4351,'2020-12-24 09:15:57',15.30,89.90),(4352,'2020-12-24 09:16:27',15.20,90.00),(4353,'2020-12-24 09:16:58',15.20,90.00),(4354,'2020-12-24 09:17:28',15.10,89.80),(4355,'2020-12-24 09:18:34',15.00,90.40),(4356,'2020-12-24 09:19:04',15.00,90.40),(4357,'2020-12-24 09:19:34',15.00,90.80),(4358,'2020-12-24 11:35:15',15.50,91.00),(4359,'2020-12-24 11:35:45',16.00,91.50),(4360,'2020-12-24 11:36:16',13.70,90.90),(4361,'2020-12-24 11:36:46',14.50,91.10),(4362,'2020-12-24 11:37:16',15.60,91.30),(4363,'2020-12-24 11:37:47',15.40,91.20),(4364,'2020-12-24 11:38:17',15.40,91.30),(4365,'2020-12-24 11:38:47',15.40,91.20),(4366,'2020-12-24 11:39:17',15.40,91.00),(4367,'2020-12-24 11:39:48',15.40,91.20),(4368,'2020-12-24 11:40:18',13.70,90.70),(4369,'2020-12-24 11:40:50',15.40,90.40),(4370,'2020-12-24 11:41:20',15.40,90.70),(4371,'2020-12-24 11:41:53',15.40,90.80),(4372,'2020-12-24 11:42:24',15.50,90.60),(4373,'2020-12-24 11:42:55',15.40,90.80),(4374,'2020-12-24 11:43:25',15.40,90.40),(4375,'2020-12-24 11:43:56',15.40,90.40),(4376,'2020-12-24 11:44:27',15.40,90.40),(4377,'2020-12-24 11:44:58',15.40,90.30),(4378,'2020-12-24 11:45:28',15.40,90.30),(4379,'2020-12-24 11:45:59',15.40,90.20),(4380,'2020-12-24 11:46:31',15.40,90.10),(4381,'2020-12-24 11:47:02',15.40,88.70),(4382,'2020-12-24 11:47:33',15.50,88.90),(4383,'2020-12-24 11:48:03',15.50,90.00),(4384,'2020-12-24 11:48:34',15.50,90.20),(4385,'2020-12-24 11:49:08',15.50,89.60),(4386,'2020-12-24 11:49:38',15.50,89.20),(4387,'2020-12-24 11:50:10',15.50,88.50),(4388,'2020-12-24 11:50:43',15.50,89.10),(4389,'2020-12-24 11:51:15',15.50,88.90),(4390,'2020-12-24 11:51:45',15.60,89.10),(4391,'2020-12-24 11:52:16',15.50,89.30),(4392,'2020-12-24 11:52:47',15.50,89.20),(4393,'2020-12-24 11:53:21',15.50,88.60),(4394,'2020-12-24 11:53:51',15.50,87.80),(4395,'2020-12-24 11:54:22',15.50,88.70),(4396,'2020-12-24 11:54:53',15.50,88.90),(4397,'2020-12-24 11:55:24',15.40,89.00),(4398,'2020-12-24 11:55:54',15.40,88.70),(4399,'2020-12-24 11:56:24',15.40,88.50),(4400,'2020-12-24 11:56:55',15.40,87.50),(4401,'2020-12-24 11:57:25',15.40,90.30),(4402,'2020-12-24 11:57:55',15.40,88.80),(4403,'2020-12-24 11:58:26',15.40,88.90),(4404,'2020-12-24 11:58:56',15.20,88.40),(4405,'2020-12-24 11:59:26',15.40,88.30),(4406,'2020-12-24 11:59:57',15.40,88.30),(4407,'2020-12-24 12:00:27',15.40,88.80),(4408,'2020-12-24 12:00:57',15.40,87.60),(4409,'2020-12-24 12:01:27',15.40,88.80),(4410,'2020-12-24 12:01:58',15.30,89.30),(4411,'2020-12-24 12:02:28',15.40,88.20),(4412,'2020-12-24 12:02:58',15.40,88.40),(4413,'2020-12-24 12:03:29',15.40,88.20),(4414,'2020-12-24 12:04:00',15.40,87.80),(4415,'2020-12-24 12:04:30',15.40,88.10),(4416,'2020-12-24 12:05:01',15.50,87.60),(4417,'2020-12-24 12:05:31',15.40,87.30),(4418,'2020-12-24 12:06:01',15.40,86.30),(4419,'2020-12-24 12:06:31',15.40,87.00),(4420,'2020-12-24 12:07:02',15.40,87.30),(4421,'2020-12-24 12:07:32',15.30,87.30),(4422,'2020-12-24 12:08:04',15.30,85.90),(4423,'2020-12-24 12:08:34',15.30,86.40),(4424,'2020-12-24 12:09:41',15.30,86.70),(4425,'2020-12-24 12:10:11',15.30,85.70),(4426,'2020-12-24 12:10:41',15.30,85.90),(4427,'2020-12-24 12:11:11',15.30,85.80),(4428,'2020-12-24 12:11:42',15.30,85.00),(4429,'2020-12-24 12:12:12',15.30,85.00),(4430,'2020-12-24 12:12:42',15.20,85.90),(4431,'2020-12-24 12:13:12',15.20,85.90),(4432,'2020-12-24 12:13:43',15.20,84.20),(4433,'2020-12-24 12:14:14',15.10,83.70),(4434,'2020-12-24 12:14:44',15.20,85.40),(4435,'2020-12-24 12:15:15',15.20,85.60),(4436,'2020-12-24 12:15:45',15.20,86.00),(4437,'2020-12-24 12:16:19',15.20,85.80),(4438,'2020-12-24 12:16:50',15.20,86.10),(4439,'2020-12-24 12:17:20',15.20,86.70),(4440,'2020-12-24 12:17:50',15.20,85.30),(4441,'2020-12-24 12:18:21',15.20,86.60),(4442,'2020-12-24 12:18:51',15.20,85.80),(4443,'2020-12-24 12:19:22',15.20,86.80),(4444,'2020-12-24 12:19:52',15.20,86.30),(4445,'2020-12-24 12:20:26',15.20,85.40),(4446,'2020-12-24 12:20:59',15.20,86.70),(4447,'2020-12-24 12:22:04',15.20,86.40),(4448,'2020-12-24 12:22:35',15.20,85.10),(4449,'2020-12-24 12:23:05',15.40,85.00),(4450,'2020-12-24 12:23:36',15.30,86.70),(4451,'2020-12-24 12:24:06',15.30,85.40),(4452,'2020-12-24 12:24:36',15.30,85.30),(4453,'2020-12-24 12:25:07',15.30,84.50),(4454,'2020-12-24 12:25:38',15.30,82.60),(4455,'2020-12-24 12:26:08',15.30,84.30),(4456,'2020-12-24 12:26:39',15.40,84.60);
/*!40000 ALTER TABLE `dht_log` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-12-28 19:36:48
Lo único importante aquí es que la tabla se llama dht_log
, la humedad corresponde al campo humidity
, la fecha a date
y la temperatura a temperature
.
Ejercicios propuestos
Pasemos a la lista de ejercicios propuestos. Recuerda que sería bueno que practiques antes de ver la solución.
- Usar función para mostrar máxima humedad
- Del mismo modo, pero ahora con otra función, mostrar la mínima humedad registrada
- Mostrar la fecha en la que se registró la mínima temperatura, y también mostrar la fecha en la que se registró la máxima
- Mostrar la fecha, temperatura y humedad de la fila en la que se registró la menor temperatura
- Usar SELECT para mostrar solo la fecha (sin hora) del primer registro que exista
- Con SELECT, ORDER BY y LIMIT mostrar los 10 registros más altos de temperatura
- Usando WHERE mostrar todos los registros que se encuentren entre las fechas 2020-12-23 20:40:07 y 2020-12-24 08:45:00
- Usar SELECT y WHERE para mostrar los registros en donde la temperatura sea menor que 17 grados centígrados
- Usando una consulta, mostrar los distintos registros de temperatura sin repetirse. Es decir, solo mostrar todas las temperaturas registradas pero sin repetir alguna
- Con SELECT, mostrar el promedio de temperatura de todos los datos
- Del mismo modo, mostrar el promedio de humedad
- Mostrar el promedio de la temperatura pero solo para el día 24 de diciembre del 2020
- Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir
Calor
. Si no, imprimirFrio
(sin acento, pues causa errores)
Ahí tienes los comentarios si quieres proponer algunos ejercicios usando este banco de datos.
Solución
Usar función para mostrar máxima humedad
En este caso simplemente invocamos a MAX
para mostrar la máxima humedad registrada. Como no se nos piden otros datos, la consulta queda así:
# Usar función para mostrar máxima humedad
SELECT MAX(humidity)
FROM dht_log;
Del mismo modo, pero ahora con otra función, mostrar la mínima humedad registrada
Ahora usamos la función MIN
y la consulta queda muy similar:
# Del mismo modo, pero ahora con otra función, mostrar la mínima humedad registrada
SELECT MIN(humidity)
FROM dht_log;
Mostrar la fecha en la que se registró la mínima temperatura, y también mostrar la fecha en la que se registró la máxima
Para esta consulta decidí usar ORDER BY
, ordenando los datos y seleccionando solo el primero con un LIMIT
. La solución queda así:
# Mostrar la fecha en la que se registró la mínima temperatura, y también mostrar la fecha en la que se registró la máxima
SELECT date
FROM dht_log
ORDER BY temperature ASC
LIMIT 1;
SELECT date
FROM dht_log
ORDER BY temperature DESC
LIMIT 1;
Fíjate en que en el primer caso es en orden ascendente, y en el segundo es descendente.
Mostrar la fecha, temperatura y humedad de la fila en la que se registró la menor temperatura
Esta consulta es muy parecida a la anterior, solo hay que seleccionar más filas.
# Mostrar la fecha, temperatura y humedad de la fila en la que se registró la menor temperatura
SELECT date, temperature, humidity
FROM dht_log
ORDER BY temperature DESC
LIMIT 1;
Usar SELECT para mostrar solo la fecha (sin hora) del primer registro que exista
Para esta consulta vamos a cortar la cadena. Como sabemos que la fecha sin hora ocupa 10 caracteres, usamos la función SUBSTR
para cortar la cadena desde 1 hasta 10, trayendo simplemente la fecha. Después descartamos los demás datos con LIMIT
.
# Usar select para mostrar solo la fecha (sin hora) del primer registro que exista
SELECT SUBSTR(date, 1, 10)
FROM dht_log
LIMIT 1;
Con SELECT, ORDER BY y LIMIT mostrar los 10 registros más altos de temperatura
En este caso es como la consulta anterior en donde mostramos la mayor temperatura, pero ahora ponemos un límite de 10.
# Con select y ORDER BY mostrar los 10 registros más altos de temperatura
SELECT temperature
FROM dht_log
ORDER BY temperature DESC
LIMIT 10;
Usando WHERE mostrar todos los registros que se encuentren entre las fechas 2020-12-23 20:40:07 y 2020-12-24 08:45:00
Para este ejercicio vamos a comparar las fechas como si fueran cadenas, y de hecho eso son, simples cadenas que se pueden comparar lexicográficamente de manera similar a cuando comparamos números, pero ahora se comparan según el alfabeto.
Entonces usamos SELECT
y WHERE
con los operadores mayor qué, y menor qué.
# Usando WHERE mostrar todos los registros que se encuentren entre las fechas 2020-12-23 20:40:07 y 2020-12-24 08:45:00
SELECT date, temperature, humidity
FROM dht_log
WHERE date >= "2020-12-23 20:40:07"
AND date <= "2020-12-24 08:45:00";
Usar SELECT y WHERE para mostrar los registros en donde la temperatura sea menor que 17 grados centígrados
De nuevo vamos a usar WHERE
pero ahora comparando números. Queda así:
# Usar SELECT y WHERE para mostrar los registros en donde la temperatura sea menor que 17 grados centígrados
SELECT date, temperature, humidity
FROM dht_log
WHERE temperature < 17;
En este caso se solicitaron los registros completos, por eso mostramos la fecha, temperatura y humedad en la solución a este ejercicio de SQL.
Usando una consulta, mostrar los distintos registros de temperatura sin repetirse.
Es decir, solo mostrar todas las temperaturas registradas pero sin repetir alguna. Para este caso simplemente hay que usar DISTINCT
. Este modificador permite seleccionar solo datos únicos:
# Usando una consulta, mostrar los distintos registros de temperatura sin repetirse. Es decir, solo mostrar todas las temperaturas registradas pero sin repetir alguna
SELECT DISTINCT temperature
FROM dht_log;
Con SELECT, mostrar el promedio de temperatura de todos los datos
Ahora vamos a usar AVG
, que es Average o promedio traducido al español. Queda así:
# Con select, mostrar el promedio de temperatura de todos los datos
SELECT AVG(temperature)
FROM dht_log;
En este caso no estamos limitando los datos, así que se va a seleccionar el promedio de todos los valores.
Del mismo modo, mostrar el promedio de humedad
Hacemos lo mismo que en la consulta anterior pero ahora con la humedad:
# Del mismo modo, mostrar el promedio de humedad
SELECT AVG(humidity)
FROM dht_log;
Mostrar el promedio de la temperatura pero solo para el día 24 de diciembre del 2020
Volvemos a usar AVG
pero ahora vamos a limitar con un WHERE
usando comparación de cadenas:
# Mostrar el promedio de la temperatura pero solo para el día 24 de diciembre del 2020
SELECT AVG(temperature)
FROM dht_log
WHERE date >= "2020-12-24 00:00:00"
AND date <= "2020-12-24 23:59:59";
Aplicamos un pequeño truco, pues no hay fecha más allá de las 23 con 59 con 59 ya que si así fuera, sería 25 de diciembre. Lo mismo pasa con la otra fecha, la del límite inferior.
Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir Calor. Si no, imprimir Frio
Imprimir esta columna sin acento, pues puede causar errores. Ahora vamos a usar la función IF. La solución queda así:
# Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir Calor. Si no, imprimir Frio.
SELECT date, temperature, humidity, IF(temperature >= 17, "Calor", "Frio")
FROM dht_log;
Poniendo todo junto
Aquí te dejo todas las consultas que resuelven los problemas propuestos en SQL. También incluyo el comentario que indica cuál ejercicio se está resolviendo:
# By: parzibyte
# Visita: https://parzibyte.me/blog
# Usar función para mostrar máxima humedad
SELECT MAX(humidity)
FROM dht_log;
# Del mismo modo, pero ahora con otra función, mostrar la mínima humedad registrada
SELECT MIN(humidity)
FROM dht_log;
# Mostrar la fecha en la que se registró la mínima temperatura, y también mostrar la fecha en la que se registró la máxima
SELECT date
FROM dht_log
ORDER BY temperature ASC
LIMIT 1;
SELECT date
FROM dht_log
ORDER BY temperature DESC
LIMIT 1;
# Mostrar la fecha, temperatura y humedad de la fila en la que se registró la menor temperatura
SELECT date, temperature, humidity
FROM dht_log
ORDER BY temperature DESC
LIMIT 1;
# Usar select para mostrar solo la fecha (sin hora) del primer registro que exista
SELECT SUBSTR(date, 1, 10)
FROM dht_log
LIMIT 1;
# Con select y ORDER BY mostrar los 10 registros más altos de temperatura
SELECT temperature
FROM dht_log
ORDER BY temperature DESC
LIMIT 10;
# Usando WHERE mostrar todos los registros que se encuentren entre las fechas 2020-12-23 20:40:07 y 2020-12-24 08:45:00
SELECT date, temperature, humidity
FROM dht_log
WHERE date >= "2020-12-23 20:40:07"
AND date <= "2020-12-24 08:45:00";
# Usar SELECT y WHERE para mostrar los registros en donde la temperatura sea menor que 17 grados centígrados
SELECT date, temperature, humidity
FROM dht_log
WHERE temperature < 17;
# Usando una consulta, mostrar los distintos registros de temperatura sin repetirse. Es decir, solo mostrar todas las temperaturas registradas pero sin repetir alguna
SELECT DISTINCT temperature
FROM dht_log;
# Con select, mostrar el promedio de temperatura de todos los datos
SELECT AVG(temperature)
FROM dht_log;
# Del mismo modo, mostrar el promedio de humedad
SELECT AVG(humidity)
FROM dht_log;
# Mostrar el promedio de la temperatura pero solo para el día 24 de diciembre del 2020
SELECT AVG(temperature)
FROM dht_log
WHERE date >= "2020-12-24 00:00:00"
AND date <= "2020-12-24 23:59:59";
# Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir Calor. Si no, imprimir Frio.
SELECT date, temperature, humidity, IF(temperature >= 17, "Calor", "Frio")
FROM dht_log;
Y aquí la salida general. Cuidado, pues es mucho texto. Solo le falta una portada para que sea una biblia:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4621
Server version: 10.4.11-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [dht_log]> # By: parzibyte
MariaDB [dht_log]> # Visita: https://parzibyte.me/blog
MariaDB [dht_log]> # Usar función para mostrar máxima humedad
MariaDB [dht_log]> SELECT MAX(humidity)
-> FROM dht_log;
+---------------+
| MAX(humidity) |
+---------------+
| 91.90 |
+---------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Del mismo modo, pero ahora con otra función, mostrar la mínima humedad registrada
MariaDB [dht_log]> SELECT MIN(humidity)
-> FROM dht_log;
+---------------+
| MIN(humidity) |
+---------------+
| 56.10 |
+---------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Mostrar la fecha en la que se registró la mínima temperatura, y también mostrar la fecha en la que se registró la máxima
MariaDB [dht_log]> SELECT date
-> FROM dht_log
-> ORDER BY temperature ASC
-> LIMIT 1;
+---------------------+
| date |
+---------------------+
| 2020-12-24 11:36:16 |
+---------------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> SELECT date
-> FROM dht_log
-> ORDER BY temperature DESC
-> LIMIT 1;
+---------------------+
| date |
+---------------------+
| 2020-12-23 20:14:20 |
+---------------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Mostrar la fecha, temperatura y humedad de la fila en la que se registró la menor temperatura
MariaDB [dht_log]> SELECT date, temperature, humidity
-> FROM dht_log
-> ORDER BY temperature DESC
-> LIMIT 1;
+---------------------+-------------+----------+
| date | temperature | humidity |
+---------------------+-------------+----------+
| 2020-12-23 20:14:20 | 19.30 | 56.10 |
+---------------------+-------------+----------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Usar select para mostrar solo la fecha (sin hora) del primer registro que exista
MariaDB [dht_log]> SELECT SUBSTR(date, 1, 10)
-> FROM dht_log
-> LIMIT 1;
+---------------------+
| SUBSTR(date, 1, 10) |
+---------------------+
| 2020-12-23 |
+---------------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Con select y ORDER BY mostrar los 10 registros más altos de temperatura
MariaDB [dht_log]> SELECT temperature
-> FROM dht_log
-> ORDER BY temperature DESC
-> LIMIT 10;
+-------------+
| temperature |
+-------------+
| 19.30 |
| 19.10 |
| 18.80 |
| 18.60 |
| 18.40 |
| 18.40 |
| 18.40 |
| 18.30 |
| 18.30 |
| 18.30 |
+-------------+
10 rows in set (0.000 sec)
MariaDB [dht_log]> # Usando WHERE mostrar todos los registros que se encuentren entre las fechas 2020-12-23 20:40:07 y 2020-12-24 08:45:00
MariaDB [dht_log]> SELECT date, temperature, humidity
-> FROM dht_log
-> WHERE date >= "2020-12-23 20:40:07"
-> AND date <= "2020-12-24 08:45:00";
+---------------------+-------------+----------+
| date | temperature | humidity |
+---------------------+-------------+----------+
| 2020-12-23 20:40:07 | 17.70 | 72.50 |
| 2020-12-23 20:40:37 | 17.70 | 72.90 |
| 2020-12-23 20:41:08 | 17.70 | 73.10 |
| 2020-12-23 20:41:38 | 17.70 | 73.50 |
| 2020-12-23 20:42:08 | 17.70 | 73.60 |
| 2020-12-23 20:42:39 | 17.70 | 73.70 |
| 2020-12-23 20:43:09 | 17.70 | 73.70 |
| 2020-12-23 21:17:05 | 17.90 | 74.40 |
| 2020-12-23 21:17:35 | 17.90 | 75.90 |
| 2020-12-23 21:18:06 | 18.10 | 76.00 |
| 2020-12-23 21:18:36 | 17.70 | 76.00 |
| 2020-12-23 21:19:06 | 17.80 | 76.40 |
| 2020-12-23 21:19:37 | 18.00 | 76.30 |
| 2020-12-23 21:20:07 | 18.00 | 76.40 |
| 2020-12-23 21:20:37 | 18.00 | 76.40 |
| 2020-12-23 21:21:08 | 18.00 | 76.60 |
| 2020-12-23 21:21:38 | 18.30 | 76.80 |
| 2020-12-23 21:22:08 | 18.00 | 76.70 |
| 2020-12-23 21:22:39 | 18.00 | 76.40 |
| 2020-12-23 21:23:09 | 18.00 | 76.30 |
| 2020-12-23 21:23:39 | 18.00 | 76.50 |
| 2020-12-23 21:24:09 | 17.70 | 76.30 |
| 2020-12-23 21:24:40 | 17.90 | 76.90 |
| 2020-12-23 21:25:10 | 17.90 | 76.80 |
| 2020-12-23 21:25:40 | 17.90 | 77.00 |
| 2020-12-23 21:26:11 | 17.80 | 77.00 |
| 2020-12-23 21:26:41 | 18.40 | 76.80 |
| 2020-12-23 21:27:11 | 17.30 | 76.60 |
| 2020-12-23 21:27:42 | 17.90 | 77.20 |
| 2020-12-23 21:28:12 | 17.80 | 77.00 |
| 2020-12-23 21:28:42 | 18.10 | 74.80 |
| 2020-12-23 21:29:12 | 17.40 | 70.90 |
| 2020-12-23 21:29:43 | 17.50 | 68.40 |
| 2020-12-23 21:30:13 | 17.60 | 67.60 |
| 2020-12-23 21:30:43 | 17.50 | 68.60 |
| 2020-12-23 21:31:14 | 17.40 | 68.50 |
| 2020-12-23 21:31:44 | 17.40 | 68.00 |
| 2020-12-23 21:32:14 | 17.10 | 68.00 |
| 2020-12-23 21:32:45 | 17.30 | 69.90 |
| 2020-12-23 21:33:15 | 17.20 | 70.10 |
| 2020-12-23 21:33:45 | 18.40 | 71.70 |
| 2020-12-23 21:34:16 | 17.40 | 71.80 |
| 2020-12-23 21:34:46 | 17.40 | 72.40 |
| 2020-12-23 21:35:16 | 17.50 | 72.20 |
| 2020-12-23 21:35:47 | 17.50 | 72.40 |
| 2020-12-23 21:36:17 | 17.50 | 72.30 |
| 2020-12-23 21:36:47 | 17.50 | 72.10 |
| 2020-12-23 21:37:17 | 17.60 | 72.20 |
| 2020-12-23 21:37:48 | 17.60 | 72.70 |
| 2020-12-23 21:38:18 | 17.70 | 73.00 |
| 2020-12-23 21:38:48 | 17.60 | 72.50 |
| 2020-12-23 21:39:19 | 17.60 | 73.60 |
| 2020-12-23 21:39:49 | 17.60 | 72.40 |
| 2020-12-23 21:40:19 | 17.60 | 72.30 |
| 2020-12-23 21:40:49 | 17.60 | 73.10 |
| 2020-12-23 21:41:20 | 17.60 | 73.70 |
| 2020-12-23 21:41:50 | 17.60 | 73.70 |
| 2020-12-23 21:42:20 | 17.50 | 73.30 |
| 2020-12-23 21:42:51 | 17.50 | 74.20 |
| 2020-12-23 21:43:21 | 17.50 | 74.10 |
| 2020-12-23 21:43:51 | 17.50 | 74.00 |
| 2020-12-23 21:44:22 | 17.50 | 74.50 |
| 2020-12-23 21:44:52 | 17.50 | 74.60 |
| 2020-12-23 21:45:22 | 17.50 | 74.40 |
| 2020-12-23 21:45:53 | 17.50 | 74.80 |
| 2020-12-23 21:46:23 | 17.50 | 74.60 |
| 2020-12-23 21:46:53 | 17.50 | 74.20 |
| 2020-12-23 21:47:24 | 17.40 | 75.20 |
| 2020-12-23 21:47:54 | 17.40 | 75.40 |
| 2020-12-23 21:48:24 | 17.30 | 75.20 |
| 2020-12-23 21:48:54 | 17.40 | 75.40 |
| 2020-12-23 21:49:25 | 17.40 | 75.10 |
| 2020-12-23 21:49:55 | 17.40 | 75.30 |
| 2020-12-23 21:50:25 | 17.40 | 75.60 |
| 2020-12-23 21:50:56 | 17.40 | 75.70 |
| 2020-12-23 21:51:26 | 17.40 | 75.70 |
| 2020-12-23 21:51:56 | 17.40 | 75.70 |
| 2020-12-23 21:52:27 | 17.40 | 75.60 |
| 2020-12-23 21:52:57 | 17.30 | 73.40 |
| 2020-12-23 21:53:27 | 17.30 | 72.70 |
| 2020-12-23 21:53:57 | 17.30 | 73.70 |
| 2020-12-23 21:54:28 | 17.30 | 73.80 |
| 2020-12-23 21:55:01 | 17.30 | 73.40 |
| 2020-12-23 21:55:31 | 17.40 | 74.00 |
| 2020-12-23 21:56:02 | 17.30 | 73.50 |
| 2020-12-23 21:56:32 | 17.30 | 71.50 |
| 2020-12-23 21:57:02 | 17.30 | 71.80 |
| 2020-12-23 21:57:33 | 17.30 | 70.70 |
| 2020-12-23 21:58:03 | 17.30 | 70.80 |
| 2020-12-23 21:58:33 | 17.30 | 71.10 |
| 2020-12-23 21:59:03 | 17.40 | 70.60 |
| 2020-12-23 21:59:34 | 17.30 | 69.20 |
| 2020-12-23 22:00:04 | 17.30 | 69.10 |
| 2020-12-23 22:00:34 | 17.30 | 68.00 |
| 2020-12-23 22:01:05 | 17.30 | 67.90 |
| 2020-12-23 22:01:35 | 17.30 | 67.40 |
| 2020-12-23 22:02:05 | 17.20 | 67.50 |
| 2020-12-23 22:02:36 | 17.20 | 67.60 |
| 2020-12-23 22:03:06 | 17.10 | 68.60 |
| 2020-12-23 22:03:36 | 17.10 | 69.30 |
| 2020-12-23 22:04:07 | 17.20 | 70.40 |
| 2020-12-23 22:04:37 | 17.20 | 70.90 |
| 2020-12-23 22:05:07 | 17.20 | 70.80 |
| 2020-12-23 22:05:38 | 17.20 | 68.90 |
| 2020-12-23 22:06:08 | 17.20 | 69.60 |
| 2020-12-23 22:06:38 | 17.20 | 69.40 |
| 2020-12-23 22:07:09 | 17.20 | 69.20 |
| 2020-12-23 22:07:39 | 17.20 | 68.20 |
| 2020-12-23 22:08:09 | 17.10 | 68.40 |
| 2020-12-23 22:08:39 | 17.10 | 68.30 |
| 2020-12-23 22:09:10 | 17.10 | 68.60 |
| 2020-12-23 22:09:40 | 17.10 | 69.00 |
| 2020-12-23 22:10:10 | 17.10 | 68.90 |
| 2020-12-23 22:10:41 | 17.10 | 69.90 |
| 2020-12-23 22:11:11 | 17.10 | 70.20 |
| 2020-12-23 22:11:41 | 17.10 | 69.60 |
| 2020-12-23 22:12:12 | 17.10 | 69.20 |
| 2020-12-23 22:12:42 | 17.10 | 68.60 |
| 2020-12-23 22:13:12 | 17.10 | 68.80 |
| 2020-12-23 22:13:43 | 17.10 | 68.50 |
| 2020-12-23 22:14:13 | 17.10 | 68.00 |
| 2020-12-23 22:14:43 | 17.10 | 68.30 |
| 2020-12-23 22:15:14 | 17.10 | 68.70 |
| 2020-12-23 22:15:44 | 17.00 | 68.40 |
| 2020-12-23 22:16:14 | 17.10 | 68.80 |
| 2020-12-23 22:16:44 | 17.10 | 69.60 |
| 2020-12-23 22:17:18 | 17.10 | 71.00 |
| 2020-12-23 22:17:48 | 17.00 | 67.50 |
| 2020-12-23 22:18:21 | 17.10 | 66.00 |
| 2020-12-23 22:18:51 | 17.00 | 67.90 |
| 2020-12-23 22:19:22 | 17.00 | 68.80 |
| 2020-12-23 22:19:52 | 16.90 | 69.70 |
| 2020-12-23 22:20:22 | 17.00 | 69.40 |
| 2020-12-23 22:20:53 | 16.90 | 70.50 |
| 2020-12-23 22:21:23 | 17.00 | 71.90 |
| 2020-12-23 22:21:53 | 16.60 | 70.00 |
| 2020-12-23 22:22:23 | 16.90 | 69.40 |
| 2020-12-23 22:22:54 | 16.90 | 69.20 |
| 2020-12-23 22:23:24 | 16.70 | 69.80 |
| 2020-12-23 22:23:54 | 16.80 | 68.80 |
| 2020-12-23 22:24:25 | 16.80 | 67.50 |
| 2020-12-23 22:24:55 | 16.80 | 67.50 |
| 2020-12-23 22:25:26 | 16.30 | 68.00 |
| 2020-12-23 22:25:56 | 16.70 | 69.00 |
| 2020-12-23 22:26:26 | 16.70 | 70.10 |
| 2020-12-23 22:26:57 | 16.80 | 71.30 |
| 2020-12-23 22:27:27 | 16.80 | 71.70 |
| 2020-12-23 22:27:57 | 17.00 | 72.60 |
| 2020-12-23 22:28:27 | 16.90 | 73.70 |
| 2020-12-23 22:28:58 | 17.30 | 73.90 |
| 2020-12-23 22:29:28 | 17.30 | 73.50 |
| 2020-12-23 22:29:58 | 17.30 | 72.20 |
| 2020-12-23 22:30:31 | 17.40 | 72.50 |
| 2020-12-23 22:31:02 | 17.30 | 72.40 |
| 2020-12-23 22:31:32 | 17.20 | 72.90 |
| 2020-12-23 22:32:02 | 17.20 | 73.60 |
| 2020-12-23 22:32:35 | 17.30 | 73.80 |
| 2020-12-23 22:33:06 | 17.50 | 73.90 |
| 2020-12-23 22:33:36 | 17.10 | 75.00 |
| 2020-12-23 22:34:06 | 17.30 | 74.90 |
| 2020-12-23 22:34:40 | 17.20 | 74.80 |
| 2020-12-23 22:35:10 | 17.30 | 74.70 |
| 2020-12-23 22:35:40 | 17.20 | 77.30 |
| 2020-12-23 22:36:11 | 17.50 | 75.10 |
| 2020-12-23 22:36:41 | 17.20 | 74.80 |
| 2020-12-23 22:37:11 | 17.50 | 75.10 |
| 2020-12-23 22:37:41 | 17.30 | 75.70 |
| 2020-12-23 22:38:12 | 17.40 | 75.30 |
| 2020-12-23 22:38:42 | 17.40 | 75.10 |
| 2020-12-23 22:39:12 | 17.40 | 75.30 |
| 2020-12-23 22:39:43 | 17.90 | 75.90 |
| 2020-12-23 22:40:13 | 17.40 | 76.10 |
| 2020-12-23 22:40:43 | 17.70 | 76.20 |
| 2020-12-23 22:41:14 | 17.40 | 76.10 |
| 2020-12-23 22:41:44 | 17.40 | 75.90 |
| 2020-12-23 22:42:14 | 17.40 | 76.10 |
| 2020-12-23 22:42:45 | 17.10 | 76.20 |
| 2020-12-23 22:43:15 | 17.60 | 77.20 |
| 2020-12-23 22:43:45 | 17.50 | 76.50 |
| 2020-12-23 22:44:16 | 17.30 | 76.70 |
| 2020-12-23 22:44:46 | 17.30 | 76.70 |
| 2020-12-23 22:45:16 | 17.30 | 77.00 |
| 2020-12-23 22:45:47 | 17.30 | 77.00 |
| 2020-12-23 22:46:17 | 17.60 | 77.40 |
| 2020-12-23 22:46:47 | 17.40 | 77.00 |
| 2020-12-23 22:47:18 | 17.50 | 77.00 |
| 2020-12-23 22:47:48 | 17.40 | 76.80 |
| 2020-12-23 22:48:21 | 17.50 | 77.10 |
| 2020-12-23 22:48:51 | 17.70 | 77.20 |
| 2020-12-23 22:49:21 | 17.50 | 77.10 |
| 2020-12-23 22:49:52 | 17.60 | 77.10 |
| 2020-12-23 22:50:22 | 17.50 | 77.50 |
| 2020-12-23 22:50:52 | 17.50 | 77.30 |
| 2020-12-23 22:51:23 | 18.30 | 77.80 |
| 2020-12-23 22:51:53 | 17.50 | 77.30 |
| 2020-12-23 22:52:23 | 17.50 | 77.70 |
| 2020-12-23 22:52:54 | 17.60 | 77.70 |
| 2020-12-23 22:59:02 | 17.60 | 78.00 |
| 2020-12-23 22:59:33 | 17.90 | 79.60 |
| 2020-12-23 23:00:03 | 17.90 | 78.10 |
| 2020-12-23 23:00:33 | 17.70 | 77.50 |
| 2020-12-23 23:01:04 | 17.90 | 77.50 |
| 2020-12-23 23:01:34 | 17.90 | 77.20 |
| 2020-12-23 23:02:04 | 17.90 | 77.40 |
| 2020-12-23 23:02:34 | 17.90 | 77.90 |
| 2020-12-23 23:03:05 | 17.90 | 78.10 |
| 2020-12-23 23:03:35 | 17.90 | 78.00 |
| 2020-12-23 23:04:05 | 17.90 | 79.00 |
| 2020-12-23 23:04:36 | 17.90 | 78.80 |
| 2020-12-23 23:05:06 | 17.80 | 78.10 |
| 2020-12-23 23:05:36 | 17.90 | 78.00 |
| 2020-12-23 23:06:07 | 17.90 | 77.80 |
| 2020-12-23 23:06:37 | 17.80 | 78.30 |
| 2020-12-23 23:07:07 | 17.70 | 78.50 |
| 2020-12-23 23:07:38 | 17.70 | 78.90 |
| 2020-12-23 23:08:08 | 17.80 | 78.90 |
| 2020-12-23 23:08:38 | 17.60 | 78.80 |
+---------------------+-------------+----------+
217 rows in set (0.001 sec)
MariaDB [dht_log]> # Usar SELECT y WHERE para mostrar los registros en donde la temperatura sea menor que 17 grados centígrados
MariaDB [dht_log]> SELECT date, temperature, humidity
-> FROM dht_log
-> WHERE temperature < 17;
+---------------------+-------------+----------+
| date | temperature | humidity |
+---------------------+-------------+----------+
| 2020-12-23 22:19:52 | 16.90 | 69.70 |
| 2020-12-23 22:20:53 | 16.90 | 70.50 |
| 2020-12-23 22:21:53 | 16.60 | 70.00 |
| 2020-12-23 22:22:23 | 16.90 | 69.40 |
| 2020-12-23 22:22:54 | 16.90 | 69.20 |
| 2020-12-23 22:23:24 | 16.70 | 69.80 |
| 2020-12-23 22:23:54 | 16.80 | 68.80 |
| 2020-12-23 22:24:25 | 16.80 | 67.50 |
| 2020-12-23 22:24:55 | 16.80 | 67.50 |
| 2020-12-23 22:25:26 | 16.30 | 68.00 |
| 2020-12-23 22:25:56 | 16.70 | 69.00 |
| 2020-12-23 22:26:26 | 16.70 | 70.10 |
| 2020-12-23 22:26:57 | 16.80 | 71.30 |
| 2020-12-23 22:27:27 | 16.80 | 71.70 |
| 2020-12-23 22:28:27 | 16.90 | 73.70 |
| 2020-12-24 08:45:51 | 15.30 | 91.60 |
| 2020-12-24 08:46:22 | 15.30 | 91.90 |
| 2020-12-24 08:46:52 | 15.40 | 91.20 |
| 2020-12-24 08:47:23 | 15.30 | 90.50 |
| 2020-12-24 08:47:54 | 15.30 | 90.10 |
| 2020-12-24 08:48:24 | 15.40 | 90.20 |
| 2020-12-24 08:48:54 | 15.40 | 90.20 |
| 2020-12-24 08:49:24 | 15.40 | 90.30 |
| 2020-12-24 08:49:55 | 15.40 | 90.20 |
| 2020-12-24 08:50:25 | 15.40 | 90.00 |
| 2020-12-24 08:51:31 | 15.40 | 90.00 |
| 2020-12-24 08:52:01 | 15.30 | 90.10 |
| 2020-12-24 08:52:31 | 15.30 | 90.00 |
| 2020-12-24 08:53:02 | 15.20 | 90.00 |
| 2020-12-24 08:53:32 | 15.20 | 90.00 |
| 2020-12-24 08:54:02 | 15.20 | 90.10 |
| 2020-12-24 08:54:33 | 15.10 | 90.20 |
| 2020-12-24 08:55:03 | 15.10 | 90.10 |
| 2020-12-24 08:55:33 | 15.10 | 90.10 |
| 2020-12-24 08:56:04 | 15.10 | 90.40 |
| 2020-12-24 08:56:35 | 15.10 | 90.60 |
| 2020-12-24 08:57:05 | 15.20 | 90.40 |
| 2020-12-24 08:57:36 | 15.20 | 90.60 |
| 2020-12-24 08:58:06 | 15.20 | 90.50 |
| 2020-12-24 08:58:36 | 15.30 | 90.90 |
| 2020-12-24 08:59:06 | 15.30 | 90.80 |
| 2020-12-24 08:59:37 | 15.30 | 91.30 |
| 2020-12-24 09:00:07 | 15.40 | 90.90 |
| 2020-12-24 09:00:37 | 15.40 | 90.40 |
| 2020-12-24 09:01:08 | 15.40 | 90.40 |
| 2020-12-24 09:01:38 | 15.40 | 90.60 |
| 2020-12-24 09:02:08 | 15.40 | 90.70 |
| 2020-12-24 09:02:39 | 15.40 | 90.50 |
| 2020-12-24 09:03:10 | 15.40 | 91.30 |
| 2020-12-24 09:03:40 | 15.40 | 90.90 |
| 2020-12-24 09:04:11 | 15.40 | 90.80 |
| 2020-12-24 09:04:41 | 15.30 | 90.40 |
| 2020-12-24 09:05:11 | 15.20 | 89.60 |
| 2020-12-24 09:05:42 | 15.20 | 90.50 |
| 2020-12-24 09:06:12 | 15.20 | 90.10 |
| 2020-12-24 09:06:42 | 15.20 | 90.20 |
| 2020-12-24 09:07:13 | 15.30 | 89.90 |
| 2020-12-24 09:07:49 | 15.40 | 89.80 |
| 2020-12-24 09:08:19 | 15.30 | 90.40 |
| 2020-12-24 09:08:49 | 15.20 | 90.10 |
| 2020-12-24 09:09:19 | 15.10 | 90.00 |
| 2020-12-24 09:09:49 | 15.10 | 89.80 |
| 2020-12-24 09:10:21 | 15.10 | 90.70 |
| 2020-12-24 09:10:51 | 15.20 | 90.30 |
| 2020-12-24 09:11:21 | 15.20 | 90.50 |
| 2020-12-24 09:11:51 | 15.30 | 90.50 |
| 2020-12-24 09:12:22 | 15.20 | 90.40 |
| 2020-12-24 09:12:52 | 15.30 | 90.40 |
| 2020-12-24 09:13:23 | 15.30 | 90.10 |
| 2020-12-24 09:13:53 | 15.40 | 90.40 |
| 2020-12-24 09:14:23 | 15.40 | 90.40 |
| 2020-12-24 09:14:53 | 15.30 | 90.10 |
| 2020-12-24 09:15:27 | 15.30 | 89.40 |
| 2020-12-24 09:15:57 | 15.30 | 89.90 |
| 2020-12-24 09:16:27 | 15.20 | 90.00 |
| 2020-12-24 09:16:58 | 15.20 | 90.00 |
| 2020-12-24 09:17:28 | 15.10 | 89.80 |
| 2020-12-24 09:18:34 | 15.00 | 90.40 |
| 2020-12-24 09:19:04 | 15.00 | 90.40 |
| 2020-12-24 09:19:34 | 15.00 | 90.80 |
| 2020-12-24 11:35:15 | 15.50 | 91.00 |
| 2020-12-24 11:35:45 | 16.00 | 91.50 |
| 2020-12-24 11:36:16 | 13.70 | 90.90 |
| 2020-12-24 11:36:46 | 14.50 | 91.10 |
| 2020-12-24 11:37:16 | 15.60 | 91.30 |
| 2020-12-24 11:37:47 | 15.40 | 91.20 |
| 2020-12-24 11:38:17 | 15.40 | 91.30 |
| 2020-12-24 11:38:47 | 15.40 | 91.20 |
| 2020-12-24 11:39:17 | 15.40 | 91.00 |
| 2020-12-24 11:39:48 | 15.40 | 91.20 |
| 2020-12-24 11:40:18 | 13.70 | 90.70 |
| 2020-12-24 11:40:50 | 15.40 | 90.40 |
| 2020-12-24 11:41:20 | 15.40 | 90.70 |
| 2020-12-24 11:41:53 | 15.40 | 90.80 |
| 2020-12-24 11:42:24 | 15.50 | 90.60 |
| 2020-12-24 11:42:55 | 15.40 | 90.80 |
| 2020-12-24 11:43:25 | 15.40 | 90.40 |
| 2020-12-24 11:43:56 | 15.40 | 90.40 |
| 2020-12-24 11:44:27 | 15.40 | 90.40 |
| 2020-12-24 11:44:58 | 15.40 | 90.30 |
| 2020-12-24 11:45:28 | 15.40 | 90.30 |
| 2020-12-24 11:45:59 | 15.40 | 90.20 |
| 2020-12-24 11:46:31 | 15.40 | 90.10 |
| 2020-12-24 11:47:02 | 15.40 | 88.70 |
| 2020-12-24 11:47:33 | 15.50 | 88.90 |
| 2020-12-24 11:48:03 | 15.50 | 90.00 |
| 2020-12-24 11:48:34 | 15.50 | 90.20 |
| 2020-12-24 11:49:08 | 15.50 | 89.60 |
| 2020-12-24 11:49:38 | 15.50 | 89.20 |
| 2020-12-24 11:50:10 | 15.50 | 88.50 |
| 2020-12-24 11:50:43 | 15.50 | 89.10 |
| 2020-12-24 11:51:15 | 15.50 | 88.90 |
| 2020-12-24 11:51:45 | 15.60 | 89.10 |
| 2020-12-24 11:52:16 | 15.50 | 89.30 |
| 2020-12-24 11:52:47 | 15.50 | 89.20 |
| 2020-12-24 11:53:21 | 15.50 | 88.60 |
| 2020-12-24 11:53:51 | 15.50 | 87.80 |
| 2020-12-24 11:54:22 | 15.50 | 88.70 |
| 2020-12-24 11:54:53 | 15.50 | 88.90 |
| 2020-12-24 11:55:24 | 15.40 | 89.00 |
| 2020-12-24 11:55:54 | 15.40 | 88.70 |
| 2020-12-24 11:56:24 | 15.40 | 88.50 |
| 2020-12-24 11:56:55 | 15.40 | 87.50 |
| 2020-12-24 11:57:25 | 15.40 | 90.30 |
| 2020-12-24 11:57:55 | 15.40 | 88.80 |
| 2020-12-24 11:58:26 | 15.40 | 88.90 |
| 2020-12-24 11:58:56 | 15.20 | 88.40 |
| 2020-12-24 11:59:26 | 15.40 | 88.30 |
| 2020-12-24 11:59:57 | 15.40 | 88.30 |
| 2020-12-24 12:00:27 | 15.40 | 88.80 |
| 2020-12-24 12:00:57 | 15.40 | 87.60 |
| 2020-12-24 12:01:27 | 15.40 | 88.80 |
| 2020-12-24 12:01:58 | 15.30 | 89.30 |
| 2020-12-24 12:02:28 | 15.40 | 88.20 |
| 2020-12-24 12:02:58 | 15.40 | 88.40 |
| 2020-12-24 12:03:29 | 15.40 | 88.20 |
| 2020-12-24 12:04:00 | 15.40 | 87.80 |
| 2020-12-24 12:04:30 | 15.40 | 88.10 |
| 2020-12-24 12:05:01 | 15.50 | 87.60 |
| 2020-12-24 12:05:31 | 15.40 | 87.30 |
| 2020-12-24 12:06:01 | 15.40 | 86.30 |
| 2020-12-24 12:06:31 | 15.40 | 87.00 |
| 2020-12-24 12:07:02 | 15.40 | 87.30 |
| 2020-12-24 12:07:32 | 15.30 | 87.30 |
| 2020-12-24 12:08:04 | 15.30 | 85.90 |
| 2020-12-24 12:08:34 | 15.30 | 86.40 |
| 2020-12-24 12:09:41 | 15.30 | 86.70 |
| 2020-12-24 12:10:11 | 15.30 | 85.70 |
| 2020-12-24 12:10:41 | 15.30 | 85.90 |
| 2020-12-24 12:11:11 | 15.30 | 85.80 |
| 2020-12-24 12:11:42 | 15.30 | 85.00 |
| 2020-12-24 12:12:12 | 15.30 | 85.00 |
| 2020-12-24 12:12:42 | 15.20 | 85.90 |
| 2020-12-24 12:13:12 | 15.20 | 85.90 |
| 2020-12-24 12:13:43 | 15.20 | 84.20 |
| 2020-12-24 12:14:14 | 15.10 | 83.70 |
| 2020-12-24 12:14:44 | 15.20 | 85.40 |
| 2020-12-24 12:15:15 | 15.20 | 85.60 |
| 2020-12-24 12:15:45 | 15.20 | 86.00 |
| 2020-12-24 12:16:19 | 15.20 | 85.80 |
| 2020-12-24 12:16:50 | 15.20 | 86.10 |
| 2020-12-24 12:17:20 | 15.20 | 86.70 |
| 2020-12-24 12:17:50 | 15.20 | 85.30 |
| 2020-12-24 12:18:21 | 15.20 | 86.60 |
| 2020-12-24 12:18:51 | 15.20 | 85.80 |
| 2020-12-24 12:19:22 | 15.20 | 86.80 |
| 2020-12-24 12:19:52 | 15.20 | 86.30 |
| 2020-12-24 12:20:26 | 15.20 | 85.40 |
| 2020-12-24 12:20:59 | 15.20 | 86.70 |
| 2020-12-24 12:22:04 | 15.20 | 86.40 |
| 2020-12-24 12:22:35 | 15.20 | 85.10 |
| 2020-12-24 12:23:05 | 15.40 | 85.00 |
| 2020-12-24 12:23:36 | 15.30 | 86.70 |
| 2020-12-24 12:24:06 | 15.30 | 85.40 |
| 2020-12-24 12:24:36 | 15.30 | 85.30 |
| 2020-12-24 12:25:07 | 15.30 | 84.50 |
| 2020-12-24 12:25:38 | 15.30 | 82.60 |
| 2020-12-24 12:26:08 | 15.30 | 84.30 |
| 2020-12-24 12:26:39 | 15.40 | 84.60 |
+---------------------+-------------+----------+
179 rows in set (0.000 sec)
MariaDB [dht_log]> # Usando una consulta, mostrar los distintos registros de temperatura sin repetirse. Es decir, solo mostrar todas las temperaturas registradas pero sin repetir alguna
MariaDB [dht_log]> SELECT DISTINCT temperature
-> FROM dht_log;
+-------------+
| temperature |
+-------------+
| 19.30 |
| 19.10 |
| 18.80 |
| 18.60 |
| 18.40 |
| 18.30 |
| 17.90 |
| 18.00 |
| 17.80 |
| 17.70 |
| 17.60 |
| 17.50 |
| 17.40 |
| 17.30 |
| 17.20 |
| 17.10 |
| 17.00 |
| 18.10 |
| 16.90 |
| 16.60 |
| 16.70 |
| 16.80 |
| 16.30 |
| 15.30 |
| 15.40 |
| 15.20 |
| 15.10 |
| 15.00 |
| 15.50 |
| 16.00 |
| 13.70 |
| 14.50 |
| 15.60 |
+-------------+
33 rows in set (0.000 sec)
MariaDB [dht_log]> # Con select, mostrar el promedio de temperatura de todos los datos
MariaDB [dht_log]> SELECT AVG(temperature)
-> FROM dht_log;
+------------------+
| AVG(temperature) |
+------------------+
| 16.641570 |
+------------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Del mismo modo, mostrar el promedio de humedad
MariaDB [dht_log]> SELECT AVG(humidity)
-> FROM dht_log;
+---------------+
| AVG(humidity) |
+---------------+
| 78.398614 |
+---------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Mostrar el promedio de la temperatura pero solo para el día 24 de diciembre del 2020
MariaDB [dht_log]> SELECT AVG(temperature)
-> FROM dht_log
-> WHERE date >= "2020-12-24 00:00:00"
-> AND date <= "2020-12-24 23:59:59";
+------------------+
| AVG(temperature) |
+------------------+
| 15.312121 |
+------------------+
1 row in set (0.000 sec)
MariaDB [dht_log]> # Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir Calor. Si no, imprimir Frio.
MariaDB [dht_log]> SELECT date, temperature, humidity, IF(temperature >= 17, "Calor", "Frio")
-> FROM dht_log;
+---------------------+-------------+----------+----------------------------------------+
| date | temperature | humidity | IF(temperature >= 17, "Calor", "Frio") |
+---------------------+-------------+----------+----------------------------------------+
| 2020-12-23 20:14:20 | 19.30 | 56.10 | Calor |
| 2020-12-23 20:14:51 | 19.10 | 57.80 | Calor |
| 2020-12-23 20:15:21 | 18.80 | 58.60 | Calor |
| 2020-12-23 20:15:52 | 18.60 | 58.00 | Calor |
| 2020-12-23 20:16:22 | 18.40 | 59.00 | Calor |
| 2020-12-23 20:16:52 | 18.30 | 59.80 | Calor |
| 2020-12-23 20:17:22 | 17.90 | 60.60 | Calor |
| 2020-12-23 20:17:53 | 18.00 | 61.00 | Calor |
| 2020-12-23 20:18:23 | 18.00 | 61.60 | Calor |
| 2020-12-23 20:18:54 | 17.90 | 61.90 | Calor |
| 2020-12-23 20:19:24 | 17.80 | 61.80 | Calor |
| 2020-12-23 20:19:55 | 17.70 | 62.20 | Calor |
| 2020-12-23 20:20:25 | 17.60 | 62.50 | Calor |
| 2020-12-23 20:20:56 | 17.50 | 62.30 | Calor |
| 2020-12-23 20:21:26 | 17.50 | 62.50 | Calor |
| 2020-12-23 20:21:56 | 17.40 | 62.90 | Calor |
| 2020-12-23 20:22:26 | 17.40 | 62.90 | Calor |
| 2020-12-23 20:22:57 | 17.40 | 62.70 | Calor |
| 2020-12-23 20:23:27 | 17.30 | 63.10 | Calor |
| 2020-12-23 20:23:57 | 17.20 | 64.20 | Calor |
| 2020-12-23 20:24:28 | 17.20 | 64.30 | Calor |
| 2020-12-23 20:24:58 | 17.10 | 64.40 | Calor |
| 2020-12-23 20:25:28 | 17.20 | 64.40 | Calor |
| 2020-12-23 20:25:59 | 17.00 | 64.00 | Calor |
| 2020-12-23 20:26:29 | 17.00 | 64.20 | Calor |
| 2020-12-23 20:26:59 | 17.00 | 64.60 | Calor |
| 2020-12-23 20:27:30 | 17.00 | 65.90 | Calor |
| 2020-12-23 20:28:00 | 17.00 | 65.10 | Calor |
| 2020-12-23 20:28:30 | 17.00 | 65.40 | Calor |
| 2020-12-23 20:29:00 | 17.10 | 67.60 | Calor |
| 2020-12-23 20:29:31 | 17.10 | 68.50 | Calor |
| 2020-12-23 20:30:01 | 17.20 | 68.60 | Calor |
| 2020-12-23 20:30:31 | 17.30 | 69.30 | Calor |
| 2020-12-23 20:31:02 | 17.30 | 69.70 | Calor |
| 2020-12-23 20:31:32 | 17.40 | 69.80 | Calor |
| 2020-12-23 20:32:02 | 17.40 | 69.80 | Calor |
| 2020-12-23 20:32:33 | 17.40 | 69.60 | Calor |
| 2020-12-23 20:33:03 | 17.40 | 70.50 | Calor |
| 2020-12-23 20:33:33 | 17.40 | 69.90 | Calor |
| 2020-12-23 20:34:03 | 17.50 | 70.20 | Calor |
| 2020-12-23 20:34:34 | 17.50 | 70.60 | Calor |
| 2020-12-23 20:35:04 | 17.50 | 70.30 | Calor |
| 2020-12-23 20:35:34 | 17.60 | 71.20 | Calor |
| 2020-12-23 20:36:05 | 17.60 | 70.90 | Calor |
| 2020-12-23 20:36:35 | 17.60 | 71.10 | Calor |
| 2020-12-23 20:37:05 | 17.60 | 71.30 | Calor |
| 2020-12-23 20:37:36 | 17.70 | 72.20 | Calor |
| 2020-12-23 20:38:06 | 17.70 | 72.00 | Calor |
| 2020-12-23 20:38:36 | 17.70 | 71.70 | Calor |
| 2020-12-23 20:39:07 | 17.70 | 72.10 | Calor |
| 2020-12-23 20:39:37 | 17.70 | 72.40 | Calor |
| 2020-12-23 20:40:07 | 17.70 | 72.50 | Calor |
| 2020-12-23 20:40:37 | 17.70 | 72.90 | Calor |
| 2020-12-23 20:41:08 | 17.70 | 73.10 | Calor |
| 2020-12-23 20:41:38 | 17.70 | 73.50 | Calor |
| 2020-12-23 20:42:08 | 17.70 | 73.60 | Calor |
| 2020-12-23 20:42:39 | 17.70 | 73.70 | Calor |
| 2020-12-23 20:43:09 | 17.70 | 73.70 | Calor |
| 2020-12-23 21:17:05 | 17.90 | 74.40 | Calor |
| 2020-12-23 21:17:35 | 17.90 | 75.90 | Calor |
| 2020-12-23 21:18:06 | 18.10 | 76.00 | Calor |
| 2020-12-23 21:18:36 | 17.70 | 76.00 | Calor |
| 2020-12-23 21:19:06 | 17.80 | 76.40 | Calor |
| 2020-12-23 21:19:37 | 18.00 | 76.30 | Calor |
| 2020-12-23 21:20:07 | 18.00 | 76.40 | Calor |
| 2020-12-23 21:20:37 | 18.00 | 76.40 | Calor |
| 2020-12-23 21:21:08 | 18.00 | 76.60 | Calor |
| 2020-12-23 21:21:38 | 18.30 | 76.80 | Calor |
| 2020-12-23 21:22:08 | 18.00 | 76.70 | Calor |
| 2020-12-23 21:22:39 | 18.00 | 76.40 | Calor |
| 2020-12-23 21:23:09 | 18.00 | 76.30 | Calor |
| 2020-12-23 21:23:39 | 18.00 | 76.50 | Calor |
| 2020-12-23 21:24:09 | 17.70 | 76.30 | Calor |
| 2020-12-23 21:24:40 | 17.90 | 76.90 | Calor |
| 2020-12-23 21:25:10 | 17.90 | 76.80 | Calor |
| 2020-12-23 21:25:40 | 17.90 | 77.00 | Calor |
| 2020-12-23 21:26:11 | 17.80 | 77.00 | Calor |
| 2020-12-23 21:26:41 | 18.40 | 76.80 | Calor |
| 2020-12-23 21:27:11 | 17.30 | 76.60 | Calor |
| 2020-12-23 21:27:42 | 17.90 | 77.20 | Calor |
| 2020-12-23 21:28:12 | 17.80 | 77.00 | Calor |
| 2020-12-23 21:28:42 | 18.10 | 74.80 | Calor |
| 2020-12-23 21:29:12 | 17.40 | 70.90 | Calor |
| 2020-12-23 21:29:43 | 17.50 | 68.40 | Calor |
| 2020-12-23 21:30:13 | 17.60 | 67.60 | Calor |
| 2020-12-23 21:30:43 | 17.50 | 68.60 | Calor |
| 2020-12-23 21:31:14 | 17.40 | 68.50 | Calor |
| 2020-12-23 21:31:44 | 17.40 | 68.00 | Calor |
| 2020-12-23 21:32:14 | 17.10 | 68.00 | Calor |
| 2020-12-23 21:32:45 | 17.30 | 69.90 | Calor |
| 2020-12-23 21:33:15 | 17.20 | 70.10 | Calor |
| 2020-12-23 21:33:45 | 18.40 | 71.70 | Calor |
| 2020-12-23 21:34:16 | 17.40 | 71.80 | Calor |
| 2020-12-23 21:34:46 | 17.40 | 72.40 | Calor |
| 2020-12-23 21:35:16 | 17.50 | 72.20 | Calor |
| 2020-12-23 21:35:47 | 17.50 | 72.40 | Calor |
| 2020-12-23 21:36:17 | 17.50 | 72.30 | Calor |
| 2020-12-23 21:36:47 | 17.50 | 72.10 | Calor |
| 2020-12-23 21:37:17 | 17.60 | 72.20 | Calor |
| 2020-12-23 21:37:48 | 17.60 | 72.70 | Calor |
| 2020-12-23 21:38:18 | 17.70 | 73.00 | Calor |
| 2020-12-23 21:38:48 | 17.60 | 72.50 | Calor |
| 2020-12-23 21:39:19 | 17.60 | 73.60 | Calor |
| 2020-12-23 21:39:49 | 17.60 | 72.40 | Calor |
| 2020-12-23 21:40:19 | 17.60 | 72.30 | Calor |
| 2020-12-23 21:40:49 | 17.60 | 73.10 | Calor |
| 2020-12-23 21:41:20 | 17.60 | 73.70 | Calor |
| 2020-12-23 21:41:50 | 17.60 | 73.70 | Calor |
| 2020-12-23 21:42:20 | 17.50 | 73.30 | Calor |
| 2020-12-23 21:42:51 | 17.50 | 74.20 | Calor |
| 2020-12-23 21:43:21 | 17.50 | 74.10 | Calor |
| 2020-12-23 21:43:51 | 17.50 | 74.00 | Calor |
| 2020-12-23 21:44:22 | 17.50 | 74.50 | Calor |
| 2020-12-23 21:44:52 | 17.50 | 74.60 | Calor |
| 2020-12-23 21:45:22 | 17.50 | 74.40 | Calor |
| 2020-12-23 21:45:53 | 17.50 | 74.80 | Calor |
| 2020-12-23 21:46:23 | 17.50 | 74.60 | Calor |
| 2020-12-23 21:46:53 | 17.50 | 74.20 | Calor |
| 2020-12-23 21:47:24 | 17.40 | 75.20 | Calor |
| 2020-12-23 21:47:54 | 17.40 | 75.40 | Calor |
| 2020-12-23 21:48:24 | 17.30 | 75.20 | Calor |
| 2020-12-23 21:48:54 | 17.40 | 75.40 | Calor |
| 2020-12-23 21:49:25 | 17.40 | 75.10 | Calor |
| 2020-12-23 21:49:55 | 17.40 | 75.30 | Calor |
| 2020-12-23 21:50:25 | 17.40 | 75.60 | Calor |
| 2020-12-23 21:50:56 | 17.40 | 75.70 | Calor |
| 2020-12-23 21:51:26 | 17.40 | 75.70 | Calor |
| 2020-12-23 21:51:56 | 17.40 | 75.70 | Calor |
| 2020-12-23 21:52:27 | 17.40 | 75.60 | Calor |
| 2020-12-23 21:52:57 | 17.30 | 73.40 | Calor |
| 2020-12-23 21:53:27 | 17.30 | 72.70 | Calor |
| 2020-12-23 21:53:57 | 17.30 | 73.70 | Calor |
| 2020-12-23 21:54:28 | 17.30 | 73.80 | Calor |
| 2020-12-23 21:55:01 | 17.30 | 73.40 | Calor |
| 2020-12-23 21:55:31 | 17.40 | 74.00 | Calor |
| 2020-12-23 21:56:02 | 17.30 | 73.50 | Calor |
| 2020-12-23 21:56:32 | 17.30 | 71.50 | Calor |
| 2020-12-23 21:57:02 | 17.30 | 71.80 | Calor |
| 2020-12-23 21:57:33 | 17.30 | 70.70 | Calor |
| 2020-12-23 21:58:03 | 17.30 | 70.80 | Calor |
| 2020-12-23 21:58:33 | 17.30 | 71.10 | Calor |
| 2020-12-23 21:59:03 | 17.40 | 70.60 | Calor |
| 2020-12-23 21:59:34 | 17.30 | 69.20 | Calor |
| 2020-12-23 22:00:04 | 17.30 | 69.10 | Calor |
| 2020-12-23 22:00:34 | 17.30 | 68.00 | Calor |
| 2020-12-23 22:01:05 | 17.30 | 67.90 | Calor |
| 2020-12-23 22:01:35 | 17.30 | 67.40 | Calor |
| 2020-12-23 22:02:05 | 17.20 | 67.50 | Calor |
| 2020-12-23 22:02:36 | 17.20 | 67.60 | Calor |
| 2020-12-23 22:03:06 | 17.10 | 68.60 | Calor |
| 2020-12-23 22:03:36 | 17.10 | 69.30 | Calor |
| 2020-12-23 22:04:07 | 17.20 | 70.40 | Calor |
| 2020-12-23 22:04:37 | 17.20 | 70.90 | Calor |
| 2020-12-23 22:05:07 | 17.20 | 70.80 | Calor |
| 2020-12-23 22:05:38 | 17.20 | 68.90 | Calor |
| 2020-12-23 22:06:08 | 17.20 | 69.60 | Calor |
| 2020-12-23 22:06:38 | 17.20 | 69.40 | Calor |
| 2020-12-23 22:07:09 | 17.20 | 69.20 | Calor |
| 2020-12-23 22:07:39 | 17.20 | 68.20 | Calor |
| 2020-12-23 22:08:09 | 17.10 | 68.40 | Calor |
| 2020-12-23 22:08:39 | 17.10 | 68.30 | Calor |
| 2020-12-23 22:09:10 | 17.10 | 68.60 | Calor |
| 2020-12-23 22:09:40 | 17.10 | 69.00 | Calor |
| 2020-12-23 22:10:10 | 17.10 | 68.90 | Calor |
| 2020-12-23 22:10:41 | 17.10 | 69.90 | Calor |
| 2020-12-23 22:11:11 | 17.10 | 70.20 | Calor |
| 2020-12-23 22:11:41 | 17.10 | 69.60 | Calor |
| 2020-12-23 22:12:12 | 17.10 | 69.20 | Calor |
| 2020-12-23 22:12:42 | 17.10 | 68.60 | Calor |
| 2020-12-23 22:13:12 | 17.10 | 68.80 | Calor |
| 2020-12-23 22:13:43 | 17.10 | 68.50 | Calor |
| 2020-12-23 22:14:13 | 17.10 | 68.00 | Calor |
| 2020-12-23 22:14:43 | 17.10 | 68.30 | Calor |
| 2020-12-23 22:15:14 | 17.10 | 68.70 | Calor |
| 2020-12-23 22:15:44 | 17.00 | 68.40 | Calor |
| 2020-12-23 22:16:14 | 17.10 | 68.80 | Calor |
| 2020-12-23 22:16:44 | 17.10 | 69.60 | Calor |
| 2020-12-23 22:17:18 | 17.10 | 71.00 | Calor |
| 2020-12-23 22:17:48 | 17.00 | 67.50 | Calor |
| 2020-12-23 22:18:21 | 17.10 | 66.00 | Calor |
| 2020-12-23 22:18:51 | 17.00 | 67.90 | Calor |
| 2020-12-23 22:19:22 | 17.00 | 68.80 | Calor |
| 2020-12-23 22:19:52 | 16.90 | 69.70 | Frio |
| 2020-12-23 22:20:22 | 17.00 | 69.40 | Calor |
| 2020-12-23 22:20:53 | 16.90 | 70.50 | Frio |
| 2020-12-23 22:21:23 | 17.00 | 71.90 | Calor |
| 2020-12-23 22:21:53 | 16.60 | 70.00 | Frio |
| 2020-12-23 22:22:23 | 16.90 | 69.40 | Frio |
| 2020-12-23 22:22:54 | 16.90 | 69.20 | Frio |
| 2020-12-23 22:23:24 | 16.70 | 69.80 | Frio |
| 2020-12-23 22:23:54 | 16.80 | 68.80 | Frio |
| 2020-12-23 22:24:25 | 16.80 | 67.50 | Frio |
| 2020-12-23 22:24:55 | 16.80 | 67.50 | Frio |
| 2020-12-23 22:25:26 | 16.30 | 68.00 | Frio |
| 2020-12-23 22:25:56 | 16.70 | 69.00 | Frio |
| 2020-12-23 22:26:26 | 16.70 | 70.10 | Frio |
| 2020-12-23 22:26:57 | 16.80 | 71.30 | Frio |
| 2020-12-23 22:27:27 | 16.80 | 71.70 | Frio |
| 2020-12-23 22:27:57 | 17.00 | 72.60 | Calor |
| 2020-12-23 22:28:27 | 16.90 | 73.70 | Frio |
| 2020-12-23 22:28:58 | 17.30 | 73.90 | Calor |
| 2020-12-23 22:29:28 | 17.30 | 73.50 | Calor |
| 2020-12-23 22:29:58 | 17.30 | 72.20 | Calor |
| 2020-12-23 22:30:31 | 17.40 | 72.50 | Calor |
| 2020-12-23 22:31:02 | 17.30 | 72.40 | Calor |
| 2020-12-23 22:31:32 | 17.20 | 72.90 | Calor |
| 2020-12-23 22:32:02 | 17.20 | 73.60 | Calor |
| 2020-12-23 22:32:35 | 17.30 | 73.80 | Calor |
| 2020-12-23 22:33:06 | 17.50 | 73.90 | Calor |
| 2020-12-23 22:33:36 | 17.10 | 75.00 | Calor |
| 2020-12-23 22:34:06 | 17.30 | 74.90 | Calor |
| 2020-12-23 22:34:40 | 17.20 | 74.80 | Calor |
| 2020-12-23 22:35:10 | 17.30 | 74.70 | Calor |
| 2020-12-23 22:35:40 | 17.20 | 77.30 | Calor |
| 2020-12-23 22:36:11 | 17.50 | 75.10 | Calor |
| 2020-12-23 22:36:41 | 17.20 | 74.80 | Calor |
| 2020-12-23 22:37:11 | 17.50 | 75.10 | Calor |
| 2020-12-23 22:37:41 | 17.30 | 75.70 | Calor |
| 2020-12-23 22:38:12 | 17.40 | 75.30 | Calor |
| 2020-12-23 22:38:42 | 17.40 | 75.10 | Calor |
| 2020-12-23 22:39:12 | 17.40 | 75.30 | Calor |
| 2020-12-23 22:39:43 | 17.90 | 75.90 | Calor |
| 2020-12-23 22:40:13 | 17.40 | 76.10 | Calor |
| 2020-12-23 22:40:43 | 17.70 | 76.20 | Calor |
| 2020-12-23 22:41:14 | 17.40 | 76.10 | Calor |
| 2020-12-23 22:41:44 | 17.40 | 75.90 | Calor |
| 2020-12-23 22:42:14 | 17.40 | 76.10 | Calor |
| 2020-12-23 22:42:45 | 17.10 | 76.20 | Calor |
| 2020-12-23 22:43:15 | 17.60 | 77.20 | Calor |
| 2020-12-23 22:43:45 | 17.50 | 76.50 | Calor |
| 2020-12-23 22:44:16 | 17.30 | 76.70 | Calor |
| 2020-12-23 22:44:46 | 17.30 | 76.70 | Calor |
| 2020-12-23 22:45:16 | 17.30 | 77.00 | Calor |
| 2020-12-23 22:45:47 | 17.30 | 77.00 | Calor |
| 2020-12-23 22:46:17 | 17.60 | 77.40 | Calor |
| 2020-12-23 22:46:47 | 17.40 | 77.00 | Calor |
| 2020-12-23 22:47:18 | 17.50 | 77.00 | Calor |
| 2020-12-23 22:47:48 | 17.40 | 76.80 | Calor |
| 2020-12-23 22:48:21 | 17.50 | 77.10 | Calor |
| 2020-12-23 22:48:51 | 17.70 | 77.20 | Calor |
| 2020-12-23 22:49:21 | 17.50 | 77.10 | Calor |
| 2020-12-23 22:49:52 | 17.60 | 77.10 | Calor |
| 2020-12-23 22:50:22 | 17.50 | 77.50 | Calor |
| 2020-12-23 22:50:52 | 17.50 | 77.30 | Calor |
| 2020-12-23 22:51:23 | 18.30 | 77.80 | Calor |
| 2020-12-23 22:51:53 | 17.50 | 77.30 | Calor |
| 2020-12-23 22:52:23 | 17.50 | 77.70 | Calor |
| 2020-12-23 22:52:54 | 17.60 | 77.70 | Calor |
| 2020-12-23 22:59:02 | 17.60 | 78.00 | Calor |
| 2020-12-23 22:59:33 | 17.90 | 79.60 | Calor |
| 2020-12-23 23:00:03 | 17.90 | 78.10 | Calor |
| 2020-12-23 23:00:33 | 17.70 | 77.50 | Calor |
| 2020-12-23 23:01:04 | 17.90 | 77.50 | Calor |
| 2020-12-23 23:01:34 | 17.90 | 77.20 | Calor |
| 2020-12-23 23:02:04 | 17.90 | 77.40 | Calor |
| 2020-12-23 23:02:34 | 17.90 | 77.90 | Calor |
| 2020-12-23 23:03:05 | 17.90 | 78.10 | Calor |
| 2020-12-23 23:03:35 | 17.90 | 78.00 | Calor |
| 2020-12-23 23:04:05 | 17.90 | 79.00 | Calor |
| 2020-12-23 23:04:36 | 17.90 | 78.80 | Calor |
| 2020-12-23 23:05:06 | 17.80 | 78.10 | Calor |
| 2020-12-23 23:05:36 | 17.90 | 78.00 | Calor |
| 2020-12-23 23:06:07 | 17.90 | 77.80 | Calor |
| 2020-12-23 23:06:37 | 17.80 | 78.30 | Calor |
| 2020-12-23 23:07:07 | 17.70 | 78.50 | Calor |
| 2020-12-23 23:07:38 | 17.70 | 78.90 | Calor |
| 2020-12-23 23:08:08 | 17.80 | 78.90 | Calor |
| 2020-12-23 23:08:38 | 17.60 | 78.80 | Calor |
| 2020-12-24 08:45:21 | 17.10 | 78.60 | Calor |
| 2020-12-24 08:45:51 | 15.30 | 91.60 | Frio |
| 2020-12-24 08:46:22 | 15.30 | 91.90 | Frio |
| 2020-12-24 08:46:52 | 15.40 | 91.20 | Frio |
| 2020-12-24 08:47:23 | 15.30 | 90.50 | Frio |
| 2020-12-24 08:47:54 | 15.30 | 90.10 | Frio |
| 2020-12-24 08:48:24 | 15.40 | 90.20 | Frio |
| 2020-12-24 08:48:54 | 15.40 | 90.20 | Frio |
| 2020-12-24 08:49:24 | 15.40 | 90.30 | Frio |
| 2020-12-24 08:49:55 | 15.40 | 90.20 | Frio |
| 2020-12-24 08:50:25 | 15.40 | 90.00 | Frio |
| 2020-12-24 08:51:31 | 15.40 | 90.00 | Frio |
| 2020-12-24 08:52:01 | 15.30 | 90.10 | Frio |
| 2020-12-24 08:52:31 | 15.30 | 90.00 | Frio |
| 2020-12-24 08:53:02 | 15.20 | 90.00 | Frio |
| 2020-12-24 08:53:32 | 15.20 | 90.00 | Frio |
| 2020-12-24 08:54:02 | 15.20 | 90.10 | Frio |
| 2020-12-24 08:54:33 | 15.10 | 90.20 | Frio |
| 2020-12-24 08:55:03 | 15.10 | 90.10 | Frio |
| 2020-12-24 08:55:33 | 15.10 | 90.10 | Frio |
| 2020-12-24 08:56:04 | 15.10 | 90.40 | Frio |
| 2020-12-24 08:56:35 | 15.10 | 90.60 | Frio |
| 2020-12-24 08:57:05 | 15.20 | 90.40 | Frio |
| 2020-12-24 08:57:36 | 15.20 | 90.60 | Frio |
| 2020-12-24 08:58:06 | 15.20 | 90.50 | Frio |
| 2020-12-24 08:58:36 | 15.30 | 90.90 | Frio |
| 2020-12-24 08:59:06 | 15.30 | 90.80 | Frio |
| 2020-12-24 08:59:37 | 15.30 | 91.30 | Frio |
| 2020-12-24 09:00:07 | 15.40 | 90.90 | Frio |
| 2020-12-24 09:00:37 | 15.40 | 90.40 | Frio |
| 2020-12-24 09:01:08 | 15.40 | 90.40 | Frio |
| 2020-12-24 09:01:38 | 15.40 | 90.60 | Frio |
| 2020-12-24 09:02:08 | 15.40 | 90.70 | Frio |
| 2020-12-24 09:02:39 | 15.40 | 90.50 | Frio |
| 2020-12-24 09:03:10 | 15.40 | 91.30 | Frio |
| 2020-12-24 09:03:40 | 15.40 | 90.90 | Frio |
| 2020-12-24 09:04:11 | 15.40 | 90.80 | Frio |
| 2020-12-24 09:04:41 | 15.30 | 90.40 | Frio |
| 2020-12-24 09:05:11 | 15.20 | 89.60 | Frio |
| 2020-12-24 09:05:42 | 15.20 | 90.50 | Frio |
| 2020-12-24 09:06:12 | 15.20 | 90.10 | Frio |
| 2020-12-24 09:06:42 | 15.20 | 90.20 | Frio |
| 2020-12-24 09:07:13 | 15.30 | 89.90 | Frio |
| 2020-12-24 09:07:49 | 15.40 | 89.80 | Frio |
| 2020-12-24 09:08:19 | 15.30 | 90.40 | Frio |
| 2020-12-24 09:08:49 | 15.20 | 90.10 | Frio |
| 2020-12-24 09:09:19 | 15.10 | 90.00 | Frio |
| 2020-12-24 09:09:49 | 15.10 | 89.80 | Frio |
| 2020-12-24 09:10:21 | 15.10 | 90.70 | Frio |
| 2020-12-24 09:10:51 | 15.20 | 90.30 | Frio |
| 2020-12-24 09:11:21 | 15.20 | 90.50 | Frio |
| 2020-12-24 09:11:51 | 15.30 | 90.50 | Frio |
| 2020-12-24 09:12:22 | 15.20 | 90.40 | Frio |
| 2020-12-24 09:12:52 | 15.30 | 90.40 | Frio |
| 2020-12-24 09:13:23 | 15.30 | 90.10 | Frio |
| 2020-12-24 09:13:53 | 15.40 | 90.40 | Frio |
| 2020-12-24 09:14:23 | 15.40 | 90.40 | Frio |
| 2020-12-24 09:14:53 | 15.30 | 90.10 | Frio |
| 2020-12-24 09:15:27 | 15.30 | 89.40 | Frio |
| 2020-12-24 09:15:57 | 15.30 | 89.90 | Frio |
| 2020-12-24 09:16:27 | 15.20 | 90.00 | Frio |
| 2020-12-24 09:16:58 | 15.20 | 90.00 | Frio |
| 2020-12-24 09:17:28 | 15.10 | 89.80 | Frio |
| 2020-12-24 09:18:34 | 15.00 | 90.40 | Frio |
| 2020-12-24 09:19:04 | 15.00 | 90.40 | Frio |
| 2020-12-24 09:19:34 | 15.00 | 90.80 | Frio |
| 2020-12-24 11:35:15 | 15.50 | 91.00 | Frio |
| 2020-12-24 11:35:45 | 16.00 | 91.50 | Frio |
| 2020-12-24 11:36:16 | 13.70 | 90.90 | Frio |
| 2020-12-24 11:36:46 | 14.50 | 91.10 | Frio |
| 2020-12-24 11:37:16 | 15.60 | 91.30 | Frio |
| 2020-12-24 11:37:47 | 15.40 | 91.20 | Frio |
| 2020-12-24 11:38:17 | 15.40 | 91.30 | Frio |
| 2020-12-24 11:38:47 | 15.40 | 91.20 | Frio |
| 2020-12-24 11:39:17 | 15.40 | 91.00 | Frio |
| 2020-12-24 11:39:48 | 15.40 | 91.20 | Frio |
| 2020-12-24 11:40:18 | 13.70 | 90.70 | Frio |
| 2020-12-24 11:40:50 | 15.40 | 90.40 | Frio |
| 2020-12-24 11:41:20 | 15.40 | 90.70 | Frio |
| 2020-12-24 11:41:53 | 15.40 | 90.80 | Frio |
| 2020-12-24 11:42:24 | 15.50 | 90.60 | Frio |
| 2020-12-24 11:42:55 | 15.40 | 90.80 | Frio |
| 2020-12-24 11:43:25 | 15.40 | 90.40 | Frio |
| 2020-12-24 11:43:56 | 15.40 | 90.40 | Frio |
| 2020-12-24 11:44:27 | 15.40 | 90.40 | Frio |
| 2020-12-24 11:44:58 | 15.40 | 90.30 | Frio |
| 2020-12-24 11:45:28 | 15.40 | 90.30 | Frio |
| 2020-12-24 11:45:59 | 15.40 | 90.20 | Frio |
| 2020-12-24 11:46:31 | 15.40 | 90.10 | Frio |
| 2020-12-24 11:47:02 | 15.40 | 88.70 | Frio |
| 2020-12-24 11:47:33 | 15.50 | 88.90 | Frio |
| 2020-12-24 11:48:03 | 15.50 | 90.00 | Frio |
| 2020-12-24 11:48:34 | 15.50 | 90.20 | Frio |
| 2020-12-24 11:49:08 | 15.50 | 89.60 | Frio |
| 2020-12-24 11:49:38 | 15.50 | 89.20 | Frio |
| 2020-12-24 11:50:10 | 15.50 | 88.50 | Frio |
| 2020-12-24 11:50:43 | 15.50 | 89.10 | Frio |
| 2020-12-24 11:51:15 | 15.50 | 88.90 | Frio |
| 2020-12-24 11:51:45 | 15.60 | 89.10 | Frio |
| 2020-12-24 11:52:16 | 15.50 | 89.30 | Frio |
| 2020-12-24 11:52:47 | 15.50 | 89.20 | Frio |
| 2020-12-24 11:53:21 | 15.50 | 88.60 | Frio |
| 2020-12-24 11:53:51 | 15.50 | 87.80 | Frio |
| 2020-12-24 11:54:22 | 15.50 | 88.70 | Frio |
| 2020-12-24 11:54:53 | 15.50 | 88.90 | Frio |
| 2020-12-24 11:55:24 | 15.40 | 89.00 | Frio |
| 2020-12-24 11:55:54 | 15.40 | 88.70 | Frio |
| 2020-12-24 11:56:24 | 15.40 | 88.50 | Frio |
| 2020-12-24 11:56:55 | 15.40 | 87.50 | Frio |
| 2020-12-24 11:57:25 | 15.40 | 90.30 | Frio |
| 2020-12-24 11:57:55 | 15.40 | 88.80 | Frio |
| 2020-12-24 11:58:26 | 15.40 | 88.90 | Frio |
| 2020-12-24 11:58:56 | 15.20 | 88.40 | Frio |
| 2020-12-24 11:59:26 | 15.40 | 88.30 | Frio |
| 2020-12-24 11:59:57 | 15.40 | 88.30 | Frio |
| 2020-12-24 12:00:27 | 15.40 | 88.80 | Frio |
| 2020-12-24 12:00:57 | 15.40 | 87.60 | Frio |
| 2020-12-24 12:01:27 | 15.40 | 88.80 | Frio |
| 2020-12-24 12:01:58 | 15.30 | 89.30 | Frio |
| 2020-12-24 12:02:28 | 15.40 | 88.20 | Frio |
| 2020-12-24 12:02:58 | 15.40 | 88.40 | Frio |
| 2020-12-24 12:03:29 | 15.40 | 88.20 | Frio |
| 2020-12-24 12:04:00 | 15.40 | 87.80 | Frio |
| 2020-12-24 12:04:30 | 15.40 | 88.10 | Frio |
| 2020-12-24 12:05:01 | 15.50 | 87.60 | Frio |
| 2020-12-24 12:05:31 | 15.40 | 87.30 | Frio |
| 2020-12-24 12:06:01 | 15.40 | 86.30 | Frio |
| 2020-12-24 12:06:31 | 15.40 | 87.00 | Frio |
| 2020-12-24 12:07:02 | 15.40 | 87.30 | Frio |
| 2020-12-24 12:07:32 | 15.30 | 87.30 | Frio |
| 2020-12-24 12:08:04 | 15.30 | 85.90 | Frio |
| 2020-12-24 12:08:34 | 15.30 | 86.40 | Frio |
| 2020-12-24 12:09:41 | 15.30 | 86.70 | Frio |
| 2020-12-24 12:10:11 | 15.30 | 85.70 | Frio |
| 2020-12-24 12:10:41 | 15.30 | 85.90 | Frio |
| 2020-12-24 12:11:11 | 15.30 | 85.80 | Frio |
| 2020-12-24 12:11:42 | 15.30 | 85.00 | Frio |
| 2020-12-24 12:12:12 | 15.30 | 85.00 | Frio |
| 2020-12-24 12:12:42 | 15.20 | 85.90 | Frio |
| 2020-12-24 12:13:12 | 15.20 | 85.90 | Frio |
| 2020-12-24 12:13:43 | 15.20 | 84.20 | Frio |
| 2020-12-24 12:14:14 | 15.10 | 83.70 | Frio |
| 2020-12-24 12:14:44 | 15.20 | 85.40 | Frio |
| 2020-12-24 12:15:15 | 15.20 | 85.60 | Frio |
| 2020-12-24 12:15:45 | 15.20 | 86.00 | Frio |
| 2020-12-24 12:16:19 | 15.20 | 85.80 | Frio |
| 2020-12-24 12:16:50 | 15.20 | 86.10 | Frio |
| 2020-12-24 12:17:20 | 15.20 | 86.70 | Frio |
| 2020-12-24 12:17:50 | 15.20 | 85.30 | Frio |
| 2020-12-24 12:18:21 | 15.20 | 86.60 | Frio |
| 2020-12-24 12:18:51 | 15.20 | 85.80 | Frio |
| 2020-12-24 12:19:22 | 15.20 | 86.80 | Frio |
| 2020-12-24 12:19:52 | 15.20 | 86.30 | Frio |
| 2020-12-24 12:20:26 | 15.20 | 85.40 | Frio |
| 2020-12-24 12:20:59 | 15.20 | 86.70 | Frio |
| 2020-12-24 12:22:04 | 15.20 | 86.40 | Frio |
| 2020-12-24 12:22:35 | 15.20 | 85.10 | Frio |
| 2020-12-24 12:23:05 | 15.40 | 85.00 | Frio |
| 2020-12-24 12:23:36 | 15.30 | 86.70 | Frio |
| 2020-12-24 12:24:06 | 15.30 | 85.40 | Frio |
| 2020-12-24 12:24:36 | 15.30 | 85.30 | Frio |
| 2020-12-24 12:25:07 | 15.30 | 84.50 | Frio |
| 2020-12-24 12:25:38 | 15.30 | 82.60 | Frio |
| 2020-12-24 12:26:08 | 15.30 | 84.30 | Frio |
| 2020-12-24 12:26:39 | 15.40 | 84.60 | Frio |
+---------------------+-------------+----------+----------------------------------------+
433 rows in set (0.001 sec)
MariaDB [dht_log]>
Con eso terminamos por hoy. Te dejo más cosas sobre SQL y MySQL por aquí.