home / sakila

rental

25 rows where customer_id = 201

✎ 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
311 2005-05-26 22:51:37.000 2830 2830 201 201 2005-06-01 00:02:37.000 1 1 2020-12-23 07:15:24
670 2005-05-28 22:04:03.000 227 227 201 201 2005-06-06 22:43:03.000 2 2 2020-12-23 07:15:28
756 2005-05-29 10:28:45.000 3152 3152 201 201 2005-06-04 12:50:45.000 1 1 2020-12-23 07:15:29
2047 2005-06-17 14:40:58.000 2371 2371 201 201 2005-06-21 08:52:58.000 1 1 2020-12-23 07:15:47
2157 2005-06-17 23:30:52.000 1619 1619 201 201 2005-06-24 01:56:52.000 2 2 2020-12-23 07:15:49
2359 2005-06-18 13:04:42.000 3087 3087 201 201 2005-06-25 11:52:42.000 1 1 2020-12-23 07:15:52
3106 2005-06-20 17:18:06.000 2637 2637 201 201 2005-06-24 14:50:06.000 2 2 2020-12-23 07:16:02
3364 2005-06-21 12:37:46.000 2329 2329 201 201 2005-06-28 07:18:46.000 2 2 2020-12-23 07:16:06
3528 2005-07-06 01:13:27.000 1954 1954 201 201 2005-07-06 23:45:27.000 2 2 2020-12-23 07:16:08
3708 2005-07-06 10:23:27.000 2105 2105 201 201 2005-07-14 09:26:27.000 1 1 2020-12-23 07:16:11
7106 2005-07-27 05:21:24.000 1415 1415 201 201 2005-08-02 01:58:24.000 2 2 2020-12-23 07:17:01
7606 2005-07-28 00:02:15.000 637 637 201 201 2005-07-29 03:14:15.000 2 2 2020-12-23 07:17:09
9355 2005-07-30 18:35:25.000 1122 1122 201 201 2005-08-03 20:33:25.000 2 2 2020-12-23 07:17:34
10750 2005-08-01 20:06:00.000 3206 3206 201 201 2005-08-07 15:48:00.000 1 1 2020-12-23 07:17:54
10865 2005-08-02 00:22:46.000 1485 1485 201 201 2005-08-09 05:08:46.000 2 2 2020-12-23 07:17:56
10891 2005-08-02 01:09:55.000 1269 1269 201 201 2005-08-05 05:03:55.000 2 2 2020-12-23 07:17:56
11807 2005-08-17 11:51:15.000 4052 4052 201 201 2005-08-21 11:47:15.000 2 2 2020-12-23 07:18:09
13076 2005-08-19 10:10:26.000 1226 1226 201 201 2005-08-22 05:41:26.000 1 1 2020-12-23 07:18:26
13613 2005-08-20 06:23:53.000 2415 2415 201 201 2005-08-29 11:40:53.000 2 2 2020-12-23 07:18:34
13671 2005-08-20 08:27:03.000 1473 1473 201 201 2005-08-26 03:56:03.000 1 1 2020-12-23 07:18:35
13672 2005-08-20 08:27:27.000 2068 2068 201 201 2005-08-22 06:15:27.000 2 2 2020-12-23 07:18:35
14656 2005-08-21 19:39:28.000 4205 4205 201 201 2005-08-24 01:36:28.000 2 2 2020-12-23 07:18:50
14973 2005-08-22 06:59:28.000 2888 2888 201 201 2005-08-30 02:28:28.000 1 1 2020-12-23 07:18:54
15887 2005-08-23 16:54:09.000 4263 4263 201 201 2005-08-26 13:20:09.000 2 2 2020-12-23 07:19:08
15974 2005-08-23 20:06:04.000 3518 3518 201 201 2005-08-27 17:33:04.000 2 2 2020-12-23 07:19:09

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