home / sakila

rental

24 rows where customer_id = 19

✎ 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
18 2005-05-25 01:10:47.000 3376 3376 19 19 2005-05-31 06:35:47.000 2 2 2020-12-23 07:15:20
110 2005-05-25 18:43:49.000 4108 4108 19 19 2005-06-03 18:13:49.000 2 2 2020-12-23 07:15:21
179 2005-05-26 04:26:06.000 2575 2575 19 19 2005-06-03 10:06:06.000 1 1 2020-12-23 07:15:22
337 2005-05-27 03:22:30.000 751 751 19 19 2005-06-02 03:27:30.000 1 1 2020-12-23 07:15:24
591 2005-05-28 13:11:04.000 377 377 19 19 2005-05-29 17:20:04.000 2 2 2020-12-23 07:15:27
696 2005-05-29 01:59:10.000 2076 2076 19 19 2005-06-01 02:45:10.000 1 1 2020-12-23 07:15:29
2657 2005-06-19 10:42:59.000 3595 3595 19 19 2005-06-28 12:37:59.000 1 1 2020-12-23 07:15:56
2848 2005-06-19 22:55:37.000 3449 3449 19 19 2005-06-25 23:10:37.000 1 1 2020-12-23 07:15:59
3423 2005-06-21 17:38:02.000 3612 3612 19 19 2005-06-23 19:47:02.000 1 1 2020-12-23 07:16:07
3549 2005-07-06 02:24:55.000 3921 3921 19 19 2005-07-06 21:40:55.000 2 2 2020-12-23 07:16:09
6495 2005-07-12 02:57:02.000 2440 2440 19 19 2005-07-14 08:35:02.000 1 1 2020-12-23 07:16:52
9157 2005-07-30 11:06:23.000 146 146 19 19 2005-08-05 05:29:23.000 2 2 2020-12-23 07:17:31
9256 2005-07-30 14:29:29.000 4021 4021 19 19 2005-08-05 16:59:29.000 1 1 2020-12-23 07:17:33
10077 2005-07-31 20:01:06.000 2333 2333 19 19 2005-08-09 16:07:06.000 1 1 2020-12-23 07:17:45
10176 2005-07-31 23:40:35.000 1181 1181 19 19 2005-08-09 00:46:35.000 2 2 2020-12-23 07:17:46
11508 2005-08-16 23:27:36.000 2688 2688 19 19 2005-08-25 01:34:36.000 2 2 2020-12-23 07:18:05
11869 2005-08-17 14:10:22.000 3453 3453 19 19 2005-08-24 18:39:22.000 1 1 2020-12-23 07:18:10
12211 2005-08-18 02:31:18.000 1484 1484 19 19 2005-08-26 02:36:18.000 1 1 2020-12-23 07:18:14
12357 2005-08-18 07:40:52.000 166 166 19 19 2005-08-22 02:51:52.000 1 1 2020-12-23 07:18:16
13718 2005-08-20 09:53:44.000 205 205 19 19 2005-08-29 13:46:44.000 2 2 2020-12-23 07:18:36
13804 2005-08-20 12:46:32.000 2232 2232 19 19 2005-08-29 14:04:32.000 2 2 2020-12-23 07:18:38
14101 2005-08-21 00:33:03.000 1892 1892 19 19 2005-08-24 01:59:03.000 1 1 2020-12-23 07:18:42
15047 2005-08-22 09:57:16.000 1309 1309 19 19 2005-08-23 11:39:16.000 1 1 2020-12-23 07:18:55
15529 2005-08-23 03:46:47.000 4015 4015 19 19 2005-08-24 00:59:47.000 1 1 2020-12-23 07:19:02

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