home / sakila

rental

26 rows where customer_id = 231

✎ 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
329 2005-05-27 01:57:14.000 2659 2659 231 231 2005-05-31 04:19:14.000 2 2 2020-12-23 07:15:24
479 2005-05-27 22:39:10.000 2060 2060 231 231 2005-06-05 22:46:10.000 2 2 2020-12-23 07:15:26
512 2005-05-28 03:07:50.000 2176 2176 231 231 2005-06-05 02:12:50.000 2 2 2020-12-23 07:15:26
2423 2005-06-18 17:32:08.000 1744 1744 231 231 2005-06-21 11:58:08.000 1 1 2020-12-23 07:15:53
3561 2005-07-06 02:54:33.000 213 213 231 231 2005-07-14 07:44:33.000 2 2 2020-12-23 07:16:09
3839 2005-07-06 16:30:30.000 3230 3230 231 231 2005-07-11 19:00:30.000 1 1 2020-12-23 07:16:13
4289 2005-07-07 15:45:58.000 3172 3172 231 231 2005-07-09 11:11:58.000 2 2 2020-12-23 07:16:20
4969 2005-07-08 23:51:26.000 4563 4563 231 231 2005-07-12 03:21:26.000 2 2 2020-12-23 07:16:30
5096 2005-07-09 06:08:23.000 490 490 231 231 2005-07-14 11:36:23.000 1 1 2020-12-23 07:16:32
5560 2005-07-10 03:13:24.000 720 720 231 231 2005-07-19 06:03:24.000 2 2 2020-12-23 07:16:39
6862 2005-07-12 19:58:09.000 3477 3477 231 231 2005-07-18 15:48:09.000 2 2 2020-12-23 07:16:58
6877 2005-07-12 20:32:58.000 3968 3968 231 231 2005-07-18 18:01:58.000 1 1 2020-12-23 07:16:58
8556 2005-07-29 11:18:27.000 2793 2793 231 231 2005-07-30 05:21:27.000 2 2 2020-12-23 07:17:23
8949 2005-07-30 03:17:02.000 2876 2876 231 231 2005-08-08 07:38:02.000 1 1 2020-12-23 07:17:28
9711 2005-07-31 08:06:41.000 1525 1525 231 231 2005-08-02 10:30:41.000 2 2 2020-12-23 07:17:40
11113 2005-08-02 08:26:24.000 1654 1654 231 231 2005-08-07 09:24:24.000 2 2 2020-12-23 07:17:59
11202 2005-08-02 11:51:57.000 3625 3625 231 231 2005-08-08 09:41:57.000 1 1 2020-12-23 07:18:00
11581 2005-08-17 02:03:02.000 1249 1249 231 231 2005-08-24 03:53:02.000 2 2 2020-12-23 07:18:06
12214 2005-08-18 02:34:22.000 2094 2094 231 231 2005-08-21 07:48:22.000 2 2 2020-12-23 07:18:14
12230 2005-08-18 03:11:04.000 1910 1910 231 231 2005-08-27 04:06:04.000 1 1 2020-12-23 07:18:14
12231 2005-08-18 03:11:44.000 1115 1115 231 231 2005-08-24 03:26:44.000 1 1 2020-12-23 07:18:14
13983 2005-08-20 19:08:32.000 457 457 231 231 2005-08-29 23:45:32.000 1 1 2020-12-23 07:18:40
14026 2005-08-20 21:21:08.000 115 115 231 231 2005-08-22 23:19:08.000 2 2 2020-12-23 07:18:41
14478 2005-08-21 13:33:28.000 2990 2990 231 231 2005-08-25 13:33:28.000 2 2 2020-12-23 07:18:47
14806 2005-08-22 00:53:08.000 2049 2049 231 231 2005-08-23 06:26:08.000 2 2 2020-12-23 07:18:52
15389 2005-08-22 22:51:13.000 2077 2077 231 231 2005-08-28 23:46:13.000 1 1 2020-12-23 07:19:01

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.721ms