home / sakila

rental

23 rows where customer_id = 328

✎ 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
862 2005-05-30 03:09:11.000 1186 1186 328 328 2005-06-03 21:27:11.000 1 1 2020-12-23 07:15:31
1670 2005-06-16 10:26:33.000 2066 2066 328 328 2005-06-19 07:15:33.000 1 1 2020-12-23 07:15:42
1980 2005-06-17 09:48:05.000 2985 2985 328 328 2005-06-23 14:43:05.000 1 1 2020-12-23 07:15:46
2243 2005-06-18 04:33:03.000 1254 1254 328 328 2005-06-23 04:14:03.000 2 2 2020-12-23 07:15:50
3024 2005-06-20 11:29:17.000 1966 1966 328 328 2005-06-27 12:51:17.000 2 2 2020-12-23 07:16:01
3239 2005-06-21 02:48:40.000 3402 3402 328 328 2005-06-22 02:49:40.000 2 2 2020-12-23 07:16:04
5450 2005-07-09 22:13:25.000 2356 2356 328 328 2005-07-13 23:28:25.000 1 1 2020-12-23 07:16:37
8017 2005-07-28 15:35:41.000 1764 1764 328 328 2005-08-01 19:12:41.000 1 1 2020-12-23 07:17:15
8577 2005-07-29 11:56:30.000 520 520 328 328 2005-08-07 15:41:30.000 1 1 2020-12-23 07:17:23
8780 2005-07-29 20:19:45.000 1095 1095 328 328 2005-08-03 22:22:45.000 2 2 2020-12-23 07:17:26
9557 2005-07-31 02:14:01.000 708 708 328 328 2005-08-05 23:55:01.000 1 1 2020-12-23 07:17:37
9835 2005-07-31 12:07:35.000 1051 1051 328 328 2005-08-04 07:32:35.000 2 2 2020-12-23 07:17:41
11174 2005-08-02 10:32:11.000 1551 1551 328 328 2005-08-09 12:30:11.000 1 1 2020-12-23 07:18:00
12175 2005-08-18 01:10:17.000 4558 4558 328 328 2005-08-19 05:25:17.000 2 2 2020-12-23 07:18:14
12825 2005-08-19 01:23:58.000 4495 4495 328 328 2005-08-20 00:19:58.000 2 2 2020-12-23 07:18:22
13609 2005-08-20 06:11:51.000 299 299 328 328 2005-08-23 04:13:51.000 2 2 2020-12-23 07:18:34
13681 2005-08-20 08:47:37.000 3039 3039 328 328 2005-08-27 09:47:37.000 1 1 2020-12-23 07:18:36
13907 2005-08-20 16:17:27.000 806 806 328 328 2005-08-24 20:14:27.000 2 2 2020-12-23 07:18:39
14307 2005-08-21 07:34:52.000 2894 2894 328 328 2005-08-29 09:45:52.000 1 1 2020-12-23 07:18:45
14755 2005-08-21 23:18:08.000 862 862 328 328 2005-08-27 01:06:08.000 2 2 2020-12-23 07:18:51
14939 2005-08-22 05:53:52.000 719 719 328 328 2005-08-27 06:20:52.000 1 1 2020-12-23 07:18:54
15179 2005-08-22 15:36:22.000 450 450 328 328 2005-08-31 19:57:22.000 1 1 2020-12-23 07:18:57
15863 2005-08-23 16:17:09.000 2783 2783 328 328 2005-08-28 16:10:09.000 2 2 2020-12-23 07:19:07

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