home / sakila

rental

31 rows where customer_id = 103

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
240 2005-05-26 12:40:23.000 3420 3420 103 103 2005-06-04 07:22:23.000 1 1 2020-12-23 07:15:23
658 2005-05-28 20:23:23.000 3226 3226 103 103 2005-06-06 19:31:23.000 2 2 2020-12-23 07:15:28
1396 2005-06-15 16:22:38.000 1007 1007 103 103 2005-06-17 15:53:38.000 2 2 2020-12-23 07:15:38
2118 2005-06-17 20:28:29.000 1261 1261 103 103 2005-06-23 22:47:29.000 1 1 2020-12-23 07:15:48
2197 2005-06-18 01:50:27.000 3350 3350 103 103 2005-06-19 01:31:27.000 2 2 2020-12-23 07:15:50
2724 2005-06-19 14:57:54.000 3879 3879 103 103 2005-06-22 16:31:54.000 2 2 2020-12-23 07:15:57
3750 2005-07-06 12:19:28.000 2422 2422 103 103 2005-07-14 13:16:28.000 2 2 2020-12-23 07:16:12
3850 2005-07-06 16:51:21.000 1700 1700 103 103 2005-07-12 13:58:21.000 1 1 2020-12-23 07:16:13
4040 2005-07-07 03:02:40.000 3046 3046 103 103 2005-07-16 06:05:40.000 2 2 2020-12-23 07:16:16
4213 2005-07-07 11:53:49.000 705 705 103 103 2005-07-13 07:51:49.000 1 1 2020-12-23 07:16:19
4357 2005-07-07 19:24:39.000 3413 3413 103 103 2005-07-12 00:11:39.000 1 1 2020-12-23 07:16:21
4872 2005-07-08 19:23:16.000 1836 1836 103 103 2005-07-10 14:17:16.000 2 2 2020-12-23 07:16:29
5163 2005-07-09 09:00:28.000 1486 1486 103 103 2005-07-17 08:07:28.000 2 2 2020-12-23 07:16:33
6525 2005-07-12 04:17:15.000 1408 1408 103 103 2005-07-18 23:11:15.000 1 1 2020-12-23 07:16:52
6697 2005-07-12 12:44:57.000 210 210 103 103 2005-07-19 13:02:57.000 1 1 2020-12-23 07:16:55
6949 2005-07-26 23:44:12.000 1594 1594 103 103 2005-07-30 05:39:12.000 2 2 2020-12-23 07:16:59
7310 2005-07-27 13:00:55.000 3711 3711 103 103 2005-07-28 17:54:55.000 1 1 2020-12-23 07:17:04
7472 2005-07-27 19:04:19.000 1535 1535 103 103 2005-08-03 00:08:19.000 2 2 2020-12-23 07:17:07
8302 2005-07-29 03:01:24.000 1314 1314 103 103 2005-07-30 01:08:24.000 2 2 2020-12-23 07:17:19
8520 2005-07-29 10:10:02.000 2440 2440 103 103 2005-08-02 05:25:02.000 2 2 2020-12-23 07:17:22
9390 2005-07-30 19:42:07.000 1794 1794 103 103 2005-08-01 23:17:07.000 1 1 2020-12-23 07:17:35
12942 2005-08-19 05:40:36.000 3938 3938 103 103 2005-08-27 02:04:36.000 1 1 2020-12-23 07:18:24
13676 2005-08-20 08:33:21.000 3170 3170 103 103 2005-08-25 02:51:21.000 1 1 2020-12-23 07:18:35
14064 2005-08-20 22:39:16.000 2938 2938 103 103 2005-08-22 00:45:16.000 2 2 2020-12-23 07:18:42
14289 2005-08-21 06:58:49.000 1185 1185 103 103 2005-08-25 11:29:49.000 2 2 2020-12-23 07:18:45
15401 2005-08-22 23:13:10.000 1721 1721 103 103 2005-09-01 03:44:10.000 1 1 2020-12-23 07:19:01
15461 2005-08-23 01:13:52.000 4542 4542 103 103 2005-08-30 00:44:52.000 1 1 2020-12-23 07:19:02
15467 2005-08-23 01:22:12.000 3658 3658 103 103 2005-08-29 23:42:12.000 2 2 2020-12-23 07:19:02
15599 2005-08-23 06:25:07.000 4560 4560 103 103 2005-08-29 00:48:07.000 1 1 2020-12-23 07:19:03
15679 2005-08-23 09:27:29.000 2945 2945 103 103 2005-08-28 09:14:29.000 1 1 2020-12-23 07:19:04
16048 2005-08-23 22:43:07.000 2019 2019 103 103 2005-08-31 21:33:07.000 1 1 2020-12-23 07:19:10

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 11.558ms