home / sakila

rental

22 rows where customer_id = 523

✎ 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
42 2005-05-25 05:24:58.000 380 380 523 523 2005-05-31 02:47:58.000 2 2 2020-12-23 07:15:20
664 2005-05-28 21:31:08.000 87 87 523 523 2005-06-02 20:56:08.000 2 2 2020-12-23 07:15:28
1729 2005-06-16 15:29:47.000 3364 3364 523 523 2005-06-25 20:55:47.000 2 2 2020-12-23 07:15:43
2447 2005-06-18 19:10:55.000 2353 2353 523 523 2005-06-27 16:35:55.000 1 1 2020-12-23 07:15:53
2583 2005-06-19 05:01:40.000 3999 3999 523 523 2005-06-28 00:04:40.000 1 1 2020-12-23 07:15:55
2669 2005-06-19 11:28:52.000 2734 2734 523 523 2005-06-20 16:43:52.000 1 1 2020-12-23 07:15:56
4605 2005-07-08 07:00:14.000 1139 1139 523 523 2005-07-16 08:38:14.000 1 1 2020-12-23 07:16:25
5155 2005-07-09 08:46:54.000 988 988 523 523 2005-07-14 04:13:54.000 1 1 2020-12-23 07:16:33
5287 2005-07-09 15:11:54.000 3110 3110 523 523 2005-07-16 16:05:54.000 2 2 2020-12-23 07:16:35
5932 2005-07-10 22:05:15.000 2269 2269 523 523 2005-07-12 17:04:15.000 2 2 2020-12-23 07:16:44
6675 2005-07-12 11:53:06.000 2124 2124 523 523 2005-07-13 06:09:06.000 1 1 2020-12-23 07:16:55
7642 2005-07-28 01:16:51.000 3995 3995 523 523 2005-08-02 00:45:51.000 2 2 2020-12-23 07:17:09
8141 2005-07-28 20:21:19.000 361 361 523 523 2005-07-30 19:16:19.000 2 2 2020-12-23 07:17:16
8372 2005-07-29 05:18:08.000 754 754 523 523 2005-08-06 09:39:08.000 1 1 2020-12-23 07:17:20
9071 2005-07-30 07:40:58.000 3151 3151 523 523 2005-08-01 06:59:58.000 2 2 2020-12-23 07:17:30
9667 2005-07-31 06:23:52.000 4289 4289 523 523 2005-08-09 09:12:52.000 1 1 2020-12-23 07:17:39
10470 2005-08-01 09:52:26.000 82 82 523 523 2005-08-05 06:52:26.000 1 1 2020-12-23 07:17:50
11827 2005-08-17 12:44:27.000 3064 3064 523 523 2005-08-24 13:31:27.000 1 1 2020-12-23 07:18:09
12288 2005-08-18 05:01:20.000 4401 4401 523 523 2005-08-25 09:51:20.000 2 2 2020-12-23 07:18:15
13133 2005-08-19 12:11:03.000 1635 1635 523 523 2005-08-28 12:36:03.000 2 2 2020-12-23 07:18:27
14766 2005-08-21 23:42:20.000 768 768 523 523 2005-08-26 03:46:20.000 1 1 2020-12-23 07:18:51
15040 2005-08-22 09:41:09.000 3207 3207 523 523 2005-08-23 12:49:09.000 2 2 2020-12-23 07:18:55

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