home / sakila

rental

23 rows where customer_id = 217

✎ 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
828 2005-05-29 22:14:55.000 2468 2468 217 217 2005-05-30 17:22:55.000 1 1 2020-12-23 07:15:31
1141 2005-05-31 19:42:02.000 4128 4128 217 217 2005-06-07 00:59:02.000 2 2 2020-12-23 07:15:35
1322 2005-06-15 10:55:09.000 2076 2076 217 217 2005-06-18 15:14:09.000 2 2 2020-12-23 07:15:37
2076 2005-06-17 16:43:47.000 2242 2242 217 217 2005-06-24 11:12:47.000 1 1 2020-12-23 07:15:48
2842 2005-06-19 22:34:20.000 4183 4183 217 217 2005-06-22 03:46:20.000 2 2 2020-12-23 07:15:59
5576 2005-07-10 03:57:05.000 1453 1453 217 217 2005-07-13 02:16:05.000 2 2 2020-12-23 07:16:39
5762 2005-07-10 12:48:01.000 1815 1815 217 217 2005-07-18 16:43:01.000 1 1 2020-12-23 07:16:42
6570 2005-07-12 05:50:31.000 2082 2082 217 217 2005-07-13 09:58:31.000 1 1 2020-12-23 07:16:53
7104 2005-07-27 05:15:25.000 118 118 217 217 2005-08-01 05:36:25.000 2 2 2020-12-23 07:17:01
8332 2005-07-29 04:16:00.000 1142 1142 217 217 2005-08-03 03:34:00.000 1 1 2020-12-23 07:17:19
9159 2005-07-30 11:16:37.000 1234 1234 217 217 2005-08-03 10:32:37.000 1 1 2020-12-23 07:17:32
9317 2005-07-30 17:13:37.000 4138 4138 217 217 2005-08-08 11:33:37.000 1 1 2020-12-23 07:17:34
9632 2005-07-31 05:02:23.000 3368 3368 217 217 2005-08-06 04:49:23.000 2 2 2020-12-23 07:17:38
9745 2005-07-31 09:16:14.000 3610 3610 217 217 2005-08-07 12:11:14.000 1 1 2020-12-23 07:17:40
10581 2005-08-01 13:52:30.000 2801 2801 217 217 2005-08-10 19:11:30.000 1 1 2020-12-23 07:17:52
10836 2005-08-01 23:29:58.000 4534 4534 217 217 2005-08-07 23:03:58.000 2 2 2020-12-23 07:17:55
11347 2005-08-02 17:18:07.000 195 195 217 217 2005-08-05 12:30:07.000 1 1 2020-12-23 07:18:02
11649 2005-08-17 04:59:26.000 3222 3222 217 217 2005-08-20 04:02:26.000 2 2 2020-12-23 07:18:07
11958 2005-08-17 17:23:20.000 2061 2061 217 217 2005-08-24 14:47:20.000 2 2 2020-12-23 07:18:11
12210 2005-08-18 02:27:29.000 3035 3035 217 217 2005-08-20 23:32:29.000 2 2 2020-12-23 07:18:14
12871 2005-08-19 02:55:36.000 2625 2625 217 217 2005-08-22 01:00:36.000 2 2 2020-12-23 07:18:23
15116 2005-08-22 12:35:40.000 518 518 217 217 2005-08-23 17:58:40.000 1 1 2020-12-23 07:18:56
15277 2005-08-22 19:02:48.000 1780 1780 217 217 2005-08-31 18:53:48.000 2 2 2020-12-23 07:18:59

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