home / sakila

rental

28 rows where customer_id = 77

✎ 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
319 2005-05-26 23:52:13.000 3024 3024 77 77 2005-05-30 18:55:13.000 1 1 2020-12-23 07:15:24
419 2005-05-27 15:15:11.000 2514 2514 77 77 2005-06-02 11:53:11.000 1 1 2020-12-23 07:15:25
561 2005-05-28 08:54:06.000 928 928 77 77 2005-06-05 05:54:06.000 1 1 2020-12-23 07:15:27
586 2005-05-28 12:03:00.000 898 898 77 77 2005-05-29 13:16:00.000 1 1 2020-12-23 07:15:27
760 2005-05-29 11:07:25.000 3250 3250 77 77 2005-06-02 14:16:25.000 1 1 2020-12-23 07:15:30
1710 2005-06-16 14:11:24.000 144 144 77 77 2005-06-22 15:26:24.000 1 1 2020-12-23 07:15:42
2354 2005-06-18 12:54:18.000 2793 2793 77 77 2005-06-26 07:23:18.000 2 2 2020-12-23 07:15:52
2452 2005-06-18 19:29:21.000 4318 4318 77 77 2005-06-26 22:27:21.000 1 1 2020-12-23 07:15:53
3151 2005-06-20 20:36:53.000 2976 2976 77 77 2005-06-25 18:56:53.000 1 1 2020-12-23 07:16:03
3238 2005-06-21 02:48:21.000 2732 2732 77 77 2005-06-23 04:43:21.000 1 1 2020-12-23 07:16:04
4928 2005-07-08 22:05:41.000 4363 4363 77 77 2005-07-09 23:09:41.000 2 2 2020-12-23 07:16:30
6168 2005-07-11 10:21:38.000 284 284 77 77 2005-07-14 09:55:38.000 2 2 2020-12-23 07:16:47
6390 2005-07-11 22:19:23.000 3057 3057 77 77 2005-07-15 20:10:23.000 2 2 2020-12-23 07:16:50
7406 2005-07-27 16:25:45.000 1412 1412 77 77 2005-08-05 20:39:45.000 1 1 2020-12-23 07:17:06
7710 2005-07-28 04:24:07.000 3716 3716 77 77 2005-08-03 22:49:07.000 2 2 2020-12-23 07:17:10
8942 2005-07-30 03:01:07.000 4375 4375 77 77 2005-08-06 22:50:07.000 2 2 2020-12-23 07:17:28
9811 2005-07-31 11:23:45.000 3305 3305 77 77 2005-08-06 15:51:45.000 1 1 2020-12-23 07:17:41
10184 2005-08-01 00:09:33.000 2785 2785 77 77 2005-08-05 04:12:33.000 2 2 2020-12-23 07:17:46
10886 2005-08-02 00:52:34.000 943 943 77 77 2005-08-08 00:30:34.000 1 1 2020-12-23 07:17:56
10895 2005-08-02 01:16:59.000 93 93 77 77 2005-08-03 02:41:59.000 2 2 2020-12-23 07:17:56
10991 2005-08-02 04:41:12.000 2854 2854 77 77 2005-08-05 05:36:12.000 2 2 2020-12-23 07:17:57
11469 2005-08-02 21:48:09.000 230 230 77 77 2005-08-06 18:37:09.000 1 1 2020-12-23 07:18:04
11767 2005-08-17 10:00:40.000 2374 2374 77 77 2005-08-25 04:14:40.000 2 2 2020-12-23 07:18:08
12065 2005-08-17 21:31:46.000 3644 3644 77 77 2005-08-26 02:26:46.000 2 2 2020-12-23 07:18:12
12328 2005-08-18 06:43:56.000 1355 1355 77 77 2005-08-23 10:19:56.000 2 2 2020-12-23 07:18:16
13752 2005-08-20 11:17:45.000 1794 1794 77 77 2005-08-29 13:25:45.000 2 2 2020-12-23 07:18:37
14530 2005-08-21 15:10:50.000 1905 1905 77 77 2005-08-26 09:20:50.000 2 2 2020-12-23 07:18:48
15359 2005-08-22 21:34:00.000 4505 4505 77 77 2005-08-29 18:59:00.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 16.737ms