home / sakila

rental

40 rows where customer_id = 197

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
94 2005-05-25 16:03:42.000 1675 1675 197 197 2005-05-30 14:23:42.000 1 1 2020-12-23 07:15:21
215 2005-05-26 09:02:47.000 679 679 197 197 2005-05-28 09:45:47.000 2 2 2020-12-23 07:15:22
391 2005-05-27 11:03:55.000 2193 2193 197 197 2005-06-01 11:59:55.000 2 2 2020-12-23 07:15:25
649 2005-05-28 19:35:45.000 1781 1781 197 197 2005-06-05 16:00:45.000 1 1 2020-12-23 07:15:28
683 2005-05-29 00:09:48.000 2038 2038 197 197 2005-06-02 04:27:48.000 1 1 2020-12-23 07:15:29
730 2005-05-29 07:00:59.000 3473 3473 197 197 2005-06-06 01:17:59.000 1 1 2020-12-23 07:15:29
903 2005-05-30 10:11:29.000 2423 2423 197 197 2005-06-03 09:33:29.000 1 1 2020-12-23 07:15:32
918 2005-05-30 11:32:24.000 818 818 197 197 2005-05-31 07:55:24.000 2 2 2020-12-23 07:15:32
1175 2005-06-15 00:15:15.000 3255 3255 197 197 2005-06-20 19:23:15.000 2 2 2020-12-23 07:15:35
1363 2005-06-15 14:05:11.000 771 771 197 197 2005-06-17 19:53:11.000 2 2 2020-12-23 07:15:38
1503 2005-06-15 22:07:09.000 763 763 197 197 2005-06-20 23:15:09.000 1 1 2020-12-23 07:15:40
1605 2005-06-16 06:17:55.000 593 593 197 197 2005-06-25 01:25:55.000 1 1 2020-12-23 07:15:41
1919 2005-06-17 05:40:52.000 3855 3855 197 197 2005-06-23 05:58:52.000 1 1 2020-12-23 07:15:46
2090 2005-06-17 18:06:14.000 17 17 197 197 2005-06-22 23:52:14.000 1 1 2020-12-23 07:15:48
2750 2005-06-19 16:37:24.000 3775 3775 197 197 2005-06-20 13:55:24.000 2 2 2020-12-23 07:15:57
2781 2005-06-19 18:24:42.000 1230 1230 197 197 2005-06-27 17:02:42.000 2 2 2020-12-23 07:15:58
4486 2005-07-08 01:09:09.000 837 837 197 197 2005-07-16 23:40:09.000 1 1 2020-12-23 07:16:23
4739 2005-07-08 13:25:57.000 140 140 197 197 2005-07-11 17:36:57.000 1 1 2020-12-23 07:16:27
5182 2005-07-09 10:08:10.000 725 725 197 197 2005-07-16 14:36:10.000 2 2 2020-12-23 07:16:33
5344 2005-07-09 17:27:05.000 159 159 197 197 2005-07-10 15:51:05.000 2 2 2020-12-23 07:16:35
8165 2005-07-28 21:23:06.000 3460 3460 197 197 2005-08-01 21:32:06.000 1 1 2020-12-23 07:17:17
9378 2005-07-30 19:12:54.000 2209 2209 197 197 2005-08-05 18:16:54.000 1 1 2020-12-23 07:17:35
9476 2005-07-30 23:06:40.000 3599 3599 197 197 2005-08-04 22:52:40.000 2 2 2020-12-23 07:17:36
9585 2005-07-31 03:05:55.000 3249 3249 197 197 2005-08-02 23:54:55.000 2 2 2020-12-23 07:17:38
10460 2005-08-01 09:31:00.000 4504 4504 197 197 2005-08-09 09:28:00.000 1 1 2020-12-23 07:17:50
10666 2005-08-01 16:56:36.000 1945 1945 197 197 2005-08-07 22:23:36.000 2 2 2020-12-23 07:17:53
10739 2005-08-01 19:46:11.000 3160 3160 197 197 2005-08-06 21:08:11.000 2 2 2020-12-23 07:17:54
10743 2005-08-01 19:55:09.000 4206 4206 197 197 2005-08-03 19:29:09.000 1 1 2020-12-23 07:17:54
11018 2005-08-02 05:27:53.000 2988 2988 197 197 2005-08-07 10:48:53.000 1 1 2020-12-23 07:17:58
11215 2005-08-02 12:20:42.000 379 379 197 197 2005-08-06 14:01:42.000 1 1 2020-12-23 07:18:00
11311 2005-08-02 15:53:48.000 204 204 197 197 2005-08-03 16:32:48.000 1 1 2020-12-23 07:18:02
11478 2005-08-02 22:09:05.000 3932 3932 197 197 2005-08-04 18:02:05.000 1 1 2020-12-23 07:18:04
11643 2005-08-17 04:49:35.000 1378 1378 197 197 2005-08-24 07:05:35.000 1 1 2020-12-23 07:18:07
12799 2005-08-19 00:27:01.000 3885 3885 197 197 2005-08-22 03:30:01.000 2 2 2020-12-23 07:18:22
13913 2005-08-20 16:37:35.000 4259 4259 197 197 2005-08-26 13:12:35.000 2 2 2020-12-23 07:18:39
14069 2005-08-20 22:51:25.000 2239 2239 197 197 2005-08-30 00:30:25.000 2 2 2020-12-23 07:18:42
14951 2005-08-22 06:19:37.000 2800 2800 197 197 2005-08-30 05:51:37.000 2 2 2020-12-23 07:18:54
15078 2005-08-22 11:09:31.000 3001 3001 197 197 2005-08-25 12:16:31.000 1 1 2020-12-23 07:18:56
15233 2005-08-22 17:41:53.000 4405 4405 197 197 2005-08-24 12:59:53.000 2 2 2020-12-23 07:18:58
15540 2005-08-23 04:12:52.000 1696 1696 197 197 2005-08-31 04:25:52.000 1 1 2020-12-23 07:19:03

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 15.678ms