home / sakila

rental

22 rows where customer_id = 169

✎ 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
527 2005-05-28 04:28:38.000 266 266 169 169 2005-06-02 08:19:38.000 1 1 2020-12-23 07:15:26
1087 2005-05-31 11:18:08.000 431 431 169 169 2005-06-04 08:33:08.000 1 1 2020-12-23 07:15:34
2023 2005-06-17 12:52:58.000 787 787 169 169 2005-06-23 11:07:58.000 1 1 2020-12-23 07:15:47
3261 2005-06-21 04:07:41.000 2029 2029 169 169 2005-06-24 06:25:41.000 2 2 2020-12-23 07:16:04
3493 2005-07-05 23:46:19.000 473 473 169 169 2005-07-15 02:31:19.000 1 1 2020-12-23 07:16:08
4687 2005-07-08 10:54:19.000 1156 1156 169 169 2005-07-10 08:00:19.000 2 2 2020-12-23 07:16:26
5066 2005-07-09 04:48:50.000 1702 1702 169 169 2005-07-12 22:54:50.000 2 2 2020-12-23 07:16:32
6143 2005-07-11 09:02:37.000 1030 1030 169 169 2005-07-19 05:57:37.000 2 2 2020-12-23 07:16:47
6453 2005-07-12 00:59:53.000 2506 2506 169 169 2005-07-14 19:17:53.000 2 2 2020-12-23 07:16:51
6488 2005-07-12 02:20:09.000 3974 3974 169 169 2005-07-20 00:53:09.000 2 2 2020-12-23 07:16:52
7187 2005-07-27 08:27:58.000 2733 2733 169 169 2005-08-05 09:05:58.000 1 1 2020-12-23 07:17:02
7597 2005-07-27 23:35:49.000 2856 2856 169 169 2005-07-30 21:38:49.000 1 1 2020-12-23 07:17:09
8558 2005-07-29 11:24:49.000 1160 1160 169 169 2005-07-31 15:03:49.000 1 1 2020-12-23 07:17:23
9203 2005-07-30 12:43:40.000 2112 2112 169 169 2005-08-01 09:31:40.000 2 2 2020-12-23 07:17:32
11687 2005-08-17 06:39:59.000 1977 1977 169 169 2005-08-23 04:53:59.000 1 1 2020-12-23 07:18:07
11898 2005-08-17 15:24:12.000 3163 3163 169 169 2005-08-24 13:36:12.000 2 2 2020-12-23 07:18:10
13198 2005-08-19 14:47:18.000 4273 4273 169 169 2005-08-21 18:09:18.000 2 2 2020-12-23 07:18:28
13237 2005-08-19 16:18:36.000 1272 1272 169 169 2005-08-25 15:22:36.000 2 2 2020-12-23 07:18:29
14435 2005-08-21 11:44:37.000 2919 2919 169 169 2005-08-24 08:04:37.000 1 1 2020-12-23 07:18:47
14805 2005-08-22 00:52:01.000 783 783 169 169 2005-08-23 03:28:01.000 2 2 2020-12-23 07:18:52
15534 2005-08-23 03:55:54.000 544 544 169 169 2005-08-24 03:54:54.000 1 1 2020-12-23 07:19:02
15680 2005-08-23 09:33:22.000 1370 1370 169 169 2005-08-31 13:29:22.000 2 2 2020-12-23 07:19:04

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