home / sakila

rental

27 rows where customer_id = 591

✎ 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
1418 2005-06-15 17:51:27.000 2974 2974 591 591 2005-06-18 23:20:27.000 2 2 2020-12-23 07:15:38
3341 2005-06-21 10:37:25.000 2189 2189 591 591 2005-06-26 15:38:25.000 1 1 2020-12-23 07:16:06
3435 2005-06-21 19:14:58.000 451 451 591 591 2005-06-24 19:58:58.000 1 1 2020-12-23 07:16:07
3636 2005-07-06 07:03:52.000 3379 3379 591 591 2005-07-08 03:14:52.000 2 2 2020-12-23 07:16:10
4383 2005-07-07 20:45:51.000 2649 2649 591 591 2005-07-17 00:52:51.000 2 2 2020-12-23 07:16:21
4581 2005-07-08 06:05:06.000 887 887 591 591 2005-07-16 00:54:06.000 1 1 2020-12-23 07:16:24
5704 2005-07-10 10:06:29.000 2104 2104 591 591 2005-07-17 10:48:29.000 1 1 2020-12-23 07:16:41
5759 2005-07-10 12:43:22.000 816 816 591 591 2005-07-16 16:42:22.000 1 1 2020-12-23 07:16:42
7118 2005-07-27 05:53:50.000 582 582 591 591 2005-08-05 04:19:50.000 2 2 2020-12-23 07:17:01
7212 2005-07-27 09:21:22.000 2905 2905 591 591 2005-08-01 04:47:22.000 2 2 2020-12-23 07:17:03
7511 2005-07-27 20:38:40.000 4044 4044 591 591 2005-08-04 22:36:40.000 2 2 2020-12-23 07:17:07
7549 2005-07-27 21:53:21.000 1765 1765 591 591 2005-08-05 18:53:21.000 1 1 2020-12-23 07:17:08
7741 2005-07-28 05:25:55.000 3917 3917 591 591 2005-08-02 02:40:55.000 1 1 2020-12-23 07:17:11
7997 2005-07-28 15:02:25.000 1845 1845 591 591 2005-08-04 14:35:25.000 1 1 2020-12-23 07:17:14
8149 2005-07-28 20:48:12.000 1790 1790 591 591 2005-08-01 20:07:12.000 2 2 2020-12-23 07:17:17
8666 2005-07-29 15:39:38.000 3669 3669 591 591 2005-08-06 17:12:38.000 1 1 2020-12-23 07:17:24
8819 2005-07-29 22:14:26.000 3100 3100 591 591 2005-08-06 23:02:26.000 2 2 2020-12-23 07:17:27
9684 2005-07-31 06:48:33.000 362 362 591 591 2005-08-01 07:07:33.000 2 2 2020-12-23 07:17:39
10415 2005-08-01 08:05:59.000 2597 2597 591 591 2005-08-04 13:46:59.000 1 1 2020-12-23 07:17:49
12203 2005-08-18 02:18:52.000 4228 4228 591 591 2005-08-22 21:01:52.000 1 1 2020-12-23 07:18:14
12227 2005-08-18 03:04:28.000 3671 3671 591 591 2005-08-21 08:52:28.000 2 2 2020-12-23 07:18:14
12547 2005-08-18 14:29:39.000 3046 3046 591 591 2005-08-22 16:52:39.000 2 2 2020-12-23 07:18:19
12571 2005-08-18 15:31:18.000 1013 1013 591 591 2005-08-23 15:20:18.000 2 2 2020-12-23 07:18:19
12934 2005-08-19 05:18:42.000 3242 3242 591 591 2005-08-24 10:42:42.000 1 1 2020-12-23 07:18:24
13104 2005-08-19 11:06:06.000 310 310 591 591 2005-08-21 13:50:06.000 2 2 2020-12-23 07:18:27
13343 2005-08-19 20:22:08.000 1032 1032 591 591 2005-08-27 17:21:08.000 1 1 2020-12-23 07:18:30
13867 2005-08-20 15:05:42.000 4514 4514 591 591 2005-08-29 10:48:42.000 2 2 2020-12-23 07:18:38

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