home / sakila

rental

23 rows where customer_id = 350

✎ 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
24 2005-05-25 02:53:02.000 3273 3273 350 350 2005-05-27 01:15:02.000 1 1 2020-12-23 07:15:20
802 2005-05-29 17:38:59.000 785 785 350 350 2005-05-31 22:42:59.000 2 2 2020-12-23 07:15:30
2011 2005-06-17 11:56:09.000 734 734 350 350 2005-06-24 06:47:09.000 2 2 2020-12-23 07:15:47
2619 2005-06-19 08:03:12.000 1848 1848 350 350 2005-06-21 05:02:12.000 2 2 2020-12-23 07:15:56
3079 2005-06-20 15:13:40.000 2135 2135 350 350 2005-06-21 12:03:40.000 1 1 2020-12-23 07:16:02
3206 2005-06-21 00:39:39.000 2196 2196 350 350 2005-06-22 05:12:39.000 1 1 2020-12-23 07:16:03
3529 2005-07-06 01:15:26.000 4316 4316 350 350 2005-07-07 04:28:26.000 1 1 2020-12-23 07:16:08
3893 2005-07-06 18:59:31.000 1281 1281 350 350 2005-07-12 19:21:31.000 1 1 2020-12-23 07:16:14
4767 2005-07-08 15:18:53.000 3744 3744 350 350 2005-07-13 15:48:53.000 1 1 2020-12-23 07:16:27
5240 2005-07-09 13:14:48.000 1378 1378 350 350 2005-07-10 18:47:48.000 2 2 2020-12-23 07:16:34
5303 2005-07-09 15:44:09.000 3572 3572 350 350 2005-07-15 18:09:09.000 2 2 2020-12-23 07:16:35
5786 2005-07-10 14:06:44.000 2290 2290 350 350 2005-07-14 19:55:44.000 2 2 2020-12-23 07:16:42
6408 2005-07-11 23:03:02.000 2008 2008 350 350 2005-07-19 23:09:02.000 2 2 2020-12-23 07:16:51
7416 2005-07-27 16:55:25.000 653 653 350 350 2005-07-29 11:27:25.000 1 1 2020-12-23 07:17:06
11504 2005-08-16 23:16:46.000 2132 2132 350 350 2005-08-18 20:49:46.000 2 2 2020-12-23 07:18:05
11595 2005-08-17 02:53:14.000 466 466 350 350 2005-08-26 02:05:14.000 1 1 2020-12-23 07:18:06
11692 2005-08-17 06:52:41.000 1222 1222 350 350 2005-08-24 12:17:41.000 2 2 2020-12-23 07:18:07
11800 2005-08-17 11:29:52.000 2284 2284 350 350 2005-08-21 08:37:52.000 1 1 2020-12-23 07:18:09
12252 2005-08-18 03:59:51.000 127 127 350 350 2005-08-25 08:54:51.000 2 2 2020-12-23 07:18:15
12445 2005-08-18 10:56:20.000 3347 3347 350 350 2005-08-21 16:46:20.000 1 1 2020-12-23 07:18:17
13086 2005-08-19 10:32:28.000 3712 3712 350 350 2005-08-26 07:57:28.000 2 2 2020-12-23 07:18:26
15789 2005-08-23 13:56:40.000 1213 1213 350 350 2005-08-27 15:25:40.000 1 1 2020-12-23 07:19:06
15807 2005-08-23 14:35:10.000 2705 2705 350 350 2005-08-29 19:06:10.000 2 2 2020-12-23 07:19:06

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