home / sakila

rental

28 rows where customer_id = 90

✎ 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
2033 2005-06-17 13:24:43.000 58 58 90 90 2005-06-20 12:34:43.000 1 1 2020-12-23 07:15:47
2584 2005-06-19 05:02:36.000 3733 3733 90 90 2005-06-28 04:52:36.000 2 2 2020-12-23 07:15:55
3132 2005-06-20 19:09:46.000 711 711 90 90 2005-06-24 19:42:46.000 1 1 2020-12-23 07:16:02
3729 2005-07-06 11:30:29.000 3156 3156 90 90 2005-07-12 07:18:29.000 1 1 2020-12-23 07:16:11
4371 2005-07-07 20:06:45.000 2533 2533 90 90 2005-07-08 18:50:45.000 1 1 2020-12-23 07:16:21
5272 2005-07-09 14:26:01.000 1547 1547 90 90 2005-07-12 20:20:01.000 1 1 2020-12-23 07:16:34
5539 2005-07-10 02:42:58.000 3217 3217 90 90 2005-07-16 02:27:58.000 2 2 2020-12-23 07:16:38
7035 2005-07-27 03:06:09.000 2439 2439 90 90 2005-08-02 21:59:09.000 2 2 2020-12-23 07:17:00
7058 2005-07-27 03:50:46.000 716 716 90 90 2005-08-04 07:40:46.000 2 2 2020-12-23 07:17:01
7428 2005-07-27 17:21:52.000 243 243 90 90 2005-08-05 17:13:52.000 2 2 2020-12-23 07:17:06
7946 2005-07-28 13:01:22.000 99 99 90 90 2005-08-03 15:27:22.000 2 2 2020-12-23 07:17:14
8024 2005-07-28 15:55:40.000 1735 1735 90 90 2005-08-02 09:56:40.000 1 1 2020-12-23 07:17:15
8408 2005-07-29 06:40:40.000 1841 1841 90 90 2005-07-30 10:02:40.000 2 2 2020-12-23 07:17:21
8870 2005-07-30 00:08:08.000 4104 4104 90 90 2005-08-08 00:15:08.000 2 2 2020-12-23 07:17:27
9337 2005-07-30 18:02:25.000 2363 2363 90 90 2005-07-31 12:30:25.000 2 2 2020-12-23 07:17:34
10206 2005-08-01 00:52:40.000 4479 4479 90 90 2005-08-10 02:36:40.000 2 2 2020-12-23 07:17:46
10722 2005-08-01 19:07:08.000 2849 2849 90 90 2005-08-04 14:09:08.000 2 2 2020-12-23 07:17:54
10835 2005-08-01 23:28:49.000 351 351 90 90 2005-08-10 21:28:49.000 2 2 2020-12-23 07:17:55
11231 2005-08-02 13:02:11.000 1100 1100 90 90 2005-08-07 10:05:11.000 2 2 2020-12-23 07:18:01
11516 2005-08-16 23:54:47.000 1860 1860 90 90 2005-08-17 20:05:47.000 1 1 2020-12-23 07:18:05
12019 2005-08-17 19:48:55.000 2566 2566 90 90 2005-08-21 18:20:55.000 1 1 2020-12-23 07:18:12
12788 2005-08-19 00:15:09.000 644 644 90 90 2005-08-27 21:54:09.000 1 1 2020-12-23 07:18:22
13051 2005-08-19 09:31:33.000 4064 4064 90 90 2005-08-28 06:15:33.000 1 1 2020-12-23 07:18:26
14608 2005-08-21 17:57:22.000 3321 3321 90 90 2005-08-25 13:20:22.000 1 1 2020-12-23 07:18:49
14807 2005-08-22 00:57:43.000 335 335 90 90 2005-08-26 23:40:43.000 1 1 2020-12-23 07:18:52
15061 2005-08-22 10:29:44.000 3436 3436 90 90 2005-08-24 14:40:44.000 1 1 2020-12-23 07:18:56
15217 2005-08-22 16:58:31.000 91 91 90 90 2005-08-23 22:33:31.000 1 1 2020-12-23 07:18:58
15674 2005-08-23 09:16:39.000 4482 4482 90 90 2005-09-01 11:57:39.000 1 1 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 8.423ms