home / sakila

rental

18 rows where customer_id = 95

✎ 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
490 2005-05-28 00:09:56.000 3524 3524 95 95 2005-05-30 22:32:56.000 2 2 2020-12-23 07:15:26
1174 2005-06-15 00:12:51.000 2653 2653 95 95 2005-06-21 02:10:51.000 2 2 2020-12-23 07:15:35
1261 2005-06-15 06:52:57.000 2447 2447 95 95 2005-06-21 01:47:57.000 2 2 2020-12-23 07:15:36
3056 2005-06-20 13:20:58.000 2010 2010 95 95 2005-06-26 08:35:58.000 2 2 2020-12-23 07:16:01
3426 2005-06-21 18:12:10.000 3019 3019 95 95 2005-06-23 18:22:10.000 1 1 2020-12-23 07:16:07
3633 2005-07-06 06:43:26.000 2978 2978 95 95 2005-07-10 04:54:26.000 1 1 2020-12-23 07:16:10
4000 2005-07-06 23:58:37.000 2122 2122 95 95 2005-07-08 21:43:37.000 1 1 2020-12-23 07:16:15
4835 2005-07-08 18:08:13.000 2499 2499 95 95 2005-07-17 16:51:13.000 2 2 2020-12-23 07:16:28
7245 2005-07-27 10:29:06.000 260 260 95 95 2005-08-05 12:09:06.000 2 2 2020-12-23 07:17:03
7471 2005-07-27 19:02:19.000 1776 1776 95 95 2005-07-30 15:12:19.000 1 1 2020-12-23 07:17:07
9222 2005-07-30 13:21:08.000 3648 3648 95 95 2005-08-08 10:42:08.000 2 2 2020-12-23 07:17:32
9695 2005-07-31 07:13:30.000 726 726 95 95 2005-08-07 05:38:30.000 2 2 2020-12-23 07:17:39
9951 2005-07-31 15:51:16.000 4412 4412 95 95 2005-08-03 14:54:16.000 1 1 2020-12-23 07:17:43
10130 2005-07-31 21:44:30.000 3964 3964 95 95 2005-08-04 17:06:30.000 1 1 2020-12-23 07:17:45
10446 2005-08-01 09:02:17.000 2671 2671 95 95 2005-08-04 10:00:17.000 2 2 2020-12-23 07:17:50
12351 2005-08-18 07:32:12.000 2299 2299 95 95 2005-08-24 04:29:12.000 2 2 2020-12-23 07:18:16
13516 2005-08-20 02:32:45.000 4286 4286 95 95 2005-08-27 04:38:45.000 1 1 2020-12-23 07:18:33
14203 2005-08-21 03:51:52.000 3668 3668 95 95 2005-08-24 06:13:52.000 2 2 2020-12-23 07:18:44

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.881ms