home / sakila

rental

25 rows where customer_id = 24

✎ 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
1007 2005-05-31 01:02:28.000 3185 3185 24 24 2005-06-07 01:36:28.000 2 2 2020-12-23 07:15:33
1077 2005-05-31 10:22:54.000 1986 1986 24 24 2005-06-02 12:21:54.000 1 1 2020-12-23 07:15:34
1716 2005-06-16 14:39:31.000 20 20 24 24 2005-06-19 15:37:31.000 1 1 2020-12-23 07:15:43
2070 2005-06-17 16:27:51.000 2609 2609 24 24 2005-06-20 20:46:51.000 1 1 2020-12-23 07:15:48
2116 2005-06-17 20:16:12.000 2373 2373 24 24 2005-06-18 17:03:12.000 2 2 2020-12-23 07:15:48
2451 2005-06-18 19:28:02.000 835 835 24 24 2005-06-23 16:41:02.000 1 1 2020-12-23 07:15:53
2963 2005-06-20 07:33:09.000 1444 1444 24 24 2005-06-28 09:23:09.000 1 1 2020-12-23 07:16:00
3649 2005-07-06 07:32:42.000 3564 3564 24 24 2005-07-12 09:37:42.000 1 1 2020-12-23 07:16:10
4378 2005-07-07 20:29:08.000 1244 1244 24 24 2005-07-12 19:17:08.000 2 2 2020-12-23 07:16:21
5310 2005-07-09 16:00:34.000 1565 1565 24 24 2005-07-12 12:45:34.000 2 2 2020-12-23 07:16:35
5648 2005-07-10 07:09:21.000 4359 4359 24 24 2005-07-16 07:23:21.000 2 2 2020-12-23 07:16:40
6855 2005-07-12 19:46:29.000 2657 2657 24 24 2005-07-15 16:56:29.000 2 2 2020-12-23 07:16:57
7266 2005-07-27 11:22:17.000 3379 3379 24 24 2005-08-04 05:45:17.000 1 1 2020-12-23 07:17:04
8947 2005-07-30 03:15:37.000 341 341 24 24 2005-08-04 07:10:37.000 2 2 2020-12-23 07:17:28
9723 2005-07-31 08:31:18.000 3968 3968 24 24 2005-08-03 10:25:18.000 1 1 2020-12-23 07:17:40
9925 2005-07-31 15:08:47.000 2351 2351 24 24 2005-08-02 20:27:47.000 1 1 2020-12-23 07:17:43
10491 2005-08-01 10:38:27.000 3091 3091 24 24 2005-08-04 04:55:27.000 2 2 2020-12-23 07:17:51
11209 2005-08-02 12:09:45.000 3219 3219 24 24 2005-08-07 08:52:45.000 1 1 2020-12-23 07:18:00
11546 2005-08-17 00:57:36.000 2522 2522 24 24 2005-08-18 23:16:36.000 1 1 2020-12-23 07:18:05
12165 2005-08-18 00:53:37.000 4215 4215 24 24 2005-08-27 00:09:37.000 2 2 2020-12-23 07:18:14
12745 2005-08-18 22:22:45.000 262 262 24 24 2005-08-20 01:44:45.000 2 2 2020-12-23 07:18:21
12999 2005-08-19 07:34:53.000 661 661 24 24 2005-08-26 03:57:53.000 1 1 2020-12-23 07:18:25
13058 2005-08-19 09:40:53.000 2437 2437 24 24 2005-08-26 05:48:53.000 2 2 2020-12-23 07:18:26
13247 2005-08-19 16:45:59.000 1271 1271 24 24 2005-08-25 15:25:59.000 1 1 2020-12-23 07:18:29
15357 2005-08-22 21:28:59.000 727 727 24 24 2005-08-25 17:15:59.000 1 1 2020-12-23 07:19:00

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