home / sakila

rental

29 rows where customer_id = 316

✎ 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
16 2005-05-25 00:43:11.000 389 389 316 316 2005-05-26 04:42:11.000 2 2 2020-12-23 07:15:20
644 2005-05-28 18:59:12.000 4304 4304 316 316 2005-06-04 18:06:12.000 1 1 2020-12-23 07:15:28
1065 2005-05-31 08:54:56.000 3379 3379 316 316 2005-06-08 09:21:56.000 1 1 2020-12-23 07:15:34
1317 2005-06-15 10:30:19.000 3696 3696 316 316 2005-06-24 08:18:19.000 1 1 2020-12-23 07:15:37
1350 2005-06-15 12:50:25.000 4261 4261 316 316 2005-06-23 11:35:25.000 1 1 2020-12-23 07:15:38
2032 2005-06-17 13:24:07.000 425 425 316 316 2005-06-18 18:18:07.000 1 1 2020-12-23 07:15:47
2338 2005-06-18 11:24:54.000 3165 3165 316 316 2005-06-19 07:34:54.000 1 1 2020-12-23 07:15:52
2491 2005-06-18 22:01:31.000 1779 1779 316 316 2005-06-26 02:46:31.000 1 1 2020-12-23 07:15:54
2820 2005-06-19 20:20:33.000 851 851 316 316 2005-06-26 20:32:33.000 1 1 2020-12-23 07:15:58
3373 2005-06-21 13:35:32.000 2219 2219 316 316 2005-06-30 12:03:32.000 1 1 2020-12-23 07:16:06
4379 2005-07-07 20:32:30.000 2773 2773 316 316 2005-07-11 20:40:30.000 2 2 2020-12-23 07:16:21
5102 2005-07-09 06:25:48.000 242 242 316 316 2005-07-16 11:32:48.000 2 2 2020-12-23 07:16:32
5544 2005-07-10 02:48:07.000 1014 1014 316 316 2005-07-17 01:08:07.000 1 1 2020-12-23 07:16:39
5618 2005-07-10 05:28:58.000 757 757 316 316 2005-07-18 01:38:58.000 1 1 2020-12-23 07:16:40
6988 2005-07-27 01:00:08.000 756 756 316 316 2005-07-31 04:35:08.000 2 2 2020-12-23 07:16:59
7339 2005-07-27 14:17:48.000 3343 3343 316 316 2005-07-31 12:47:48.000 2 2 2020-12-23 07:17:05
7586 2005-07-27 23:19:29.000 15 15 316 316 2005-07-29 23:04:29.000 1 1 2020-12-23 07:17:08
7592 2005-07-27 23:26:04.000 4105 4105 316 316 2005-07-29 23:48:04.000 2 2 2020-12-23 07:17:08
7945 2005-07-28 12:53:58.000 3326 3326 316 316 2005-08-03 14:04:58.000 1 1 2020-12-23 07:17:14
8564 2005-07-29 11:33:00.000 2830 2830 316 316 2005-08-05 15:35:00.000 1 1 2020-12-23 07:17:23
9508 2005-07-31 00:22:39.000 1204 1204 316 316 2005-08-04 05:40:39.000 1 1 2020-12-23 07:17:37
9903 2005-07-31 14:31:44.000 1621 1621 316 316 2005-08-08 20:03:44.000 1 1 2020-12-23 07:17:42
10438 2005-08-01 08:53:04.000 4217 4217 316 316 2005-08-09 06:39:04.000 2 2 2020-12-23 07:17:50
12028 2005-08-17 20:03:47.000 607 607 316 316 2005-08-23 17:09:47.000 2 2 2020-12-23 07:18:12
12191 2005-08-18 01:57:11.000 2667 2667 316 316 2005-08-22 22:53:11.000 2 2 2020-12-23 07:18:14
12823 2005-08-19 01:15:47.000 426 426 316 316 2005-08-22 05:32:47.000 2 2 2020-12-23 07:18:22
13277 2005-08-19 17:57:35.000 3820 3820 316 316 2005-08-25 15:45:35.000 2 2 2020-12-23 07:18:29
14226 2005-08-21 04:55:37.000 1793 1793 316 316 2005-08-24 04:32:37.000 1 1 2020-12-23 07:18:44
15840 2005-08-23 15:34:49.000 1901 1901 316 316 2005-08-24 16:54:49.000 1 1 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 12.967ms