home / sakila

rental

16 rows where customer_id = 164

✎ 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
1011 2005-05-31 02:05:39.000 118 118 164 164 2005-06-04 21:27:39.000 2 2 2020-12-23 07:15:33
1713 2005-06-16 14:28:33.000 2580 2580 164 164 2005-06-18 09:02:33.000 1 1 2020-12-23 07:15:42
2589 2005-06-19 05:21:27.000 225 225 164 164 2005-06-21 09:55:27.000 2 2 2020-12-23 07:15:55
3082 2005-06-20 15:32:11.000 4431 4431 164 164 2005-06-28 13:08:11.000 1 1 2020-12-23 07:16:02
4548 2005-07-08 04:21:54.000 765 765 164 164 2005-07-14 23:16:54.000 2 2 2020-12-23 07:16:24
5895 2005-07-10 20:13:19.000 2272 2272 164 164 2005-07-17 17:51:19.000 1 1 2020-12-23 07:16:44
6393 2005-07-11 22:28:12.000 3802 3802 164 164 2005-07-14 18:03:12.000 1 1 2020-12-23 07:16:51
6558 2005-07-12 05:16:07.000 2195 2195 164 164 2005-07-13 05:32:07.000 2 2 2020-12-23 07:16:53
6637 2005-07-12 09:57:39.000 2852 2852 164 164 2005-07-19 08:40:39.000 1 1 2020-12-23 07:16:54
6702 2005-07-12 12:48:03.000 233 233 164 164 2005-07-13 11:55:03.000 1 1 2020-12-23 07:16:55
6980 2005-07-27 00:50:30.000 1127 1127 164 164 2005-08-03 23:35:30.000 1 1 2020-12-23 07:16:59
7227 2005-07-27 09:53:43.000 791 791 164 164 2005-08-05 09:36:43.000 2 2 2020-12-23 07:17:03
8135 2005-07-28 20:03:25.000 1339 1339 164 164 2005-08-03 01:28:25.000 2 2 2020-12-23 07:17:16
8824 2005-07-29 22:22:58.000 3506 3506 164 164 2005-07-31 21:02:58.000 2 2 2020-12-23 07:17:27
11175 2005-08-02 10:38:47.000 85 85 164 164 2005-08-07 07:11:47.000 2 2 2020-12-23 07:18:00
13453 2005-08-20 00:30:51.000 2203 2203 164 164 2005-08-28 18:43:51.000 2 2 2020-12-23 07:18:32

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