home / sakila

rental

30 rows where customer_id = 80

✎ 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
2596 2005-06-19 05:48:26.000 2229 2229 80 80 2005-06-24 10:16:26.000 1 1 2020-12-23 07:15:55
2805 2005-06-19 19:29:17.000 2153 2153 80 80 2005-06-27 23:14:17.000 2 2 2020-12-23 07:15:58
3367 2005-06-21 13:08:21.000 2442 2442 80 80 2005-06-26 08:43:21.000 2 2 2020-12-23 07:16:06
3623 2005-07-06 06:05:23.000 430 430 80 80 2005-07-07 05:59:23.000 1 1 2020-12-23 07:16:10
4268 2005-07-07 14:36:05.000 432 432 80 80 2005-07-16 14:36:05.000 1 1 2020-12-23 07:16:20
4299 2005-07-07 16:33:48.000 870 870 80 80 2005-07-16 11:48:48.000 1 1 2020-12-23 07:16:20
4688 2005-07-08 11:03:29.000 3574 3574 80 80 2005-07-17 15:41:29.000 2 2 2020-12-23 07:16:26
5420 2005-07-09 20:48:42.000 1739 1739 80 80 2005-07-15 21:35:42.000 2 2 2020-12-23 07:16:37
5452 2005-07-09 22:23:21.000 2036 2036 80 80 2005-07-17 00:20:21.000 1 1 2020-12-23 07:16:37
6199 2005-07-11 12:16:03.000 4329 4329 80 80 2005-07-18 15:33:03.000 2 2 2020-12-23 07:16:48
6417 2005-07-11 23:35:11.000 3042 3042 80 80 2005-07-18 20:00:11.000 2 2 2020-12-23 07:16:51
6707 2005-07-12 13:07:55.000 406 406 80 80 2005-07-16 16:26:55.000 2 2 2020-12-23 07:16:55
7558 2005-07-27 22:19:08.000 550 550 80 80 2005-07-30 21:31:08.000 1 1 2020-12-23 07:17:08
8509 2005-07-29 09:38:19.000 1332 1332 80 80 2005-08-04 11:45:19.000 1 1 2020-12-23 07:17:22
8884 2005-07-30 00:26:22.000 3050 3050 80 80 2005-08-05 03:24:22.000 1 1 2020-12-23 07:17:27
10313 2005-08-01 04:29:29.000 1194 1194 80 80 2005-08-04 08:12:29.000 2 2 2020-12-23 07:17:48
10656 2005-08-01 16:38:04.000 2571 2571 80 80 2005-08-09 19:37:04.000 2 2 2020-12-23 07:17:53
10690 2005-08-01 18:05:54.000 807 807 80 80 2005-08-10 21:43:54.000 2 2 2020-12-23 07:17:54
11101 2005-08-02 08:08:24.000 2621 2621 80 80 2005-08-06 05:55:24.000 1 1 2020-12-23 07:17:59
11839 2005-08-17 13:08:45.000 2282 2282 80 80 2005-08-18 15:05:45.000 2 2 2020-12-23 07:18:09
11850 2005-08-17 13:30:15.000 1437 1437 80 80 2005-08-21 17:24:15.000 1 1 2020-12-23 07:18:09
12457 2006-02-14 15:16:03.000 2145 2145 80 80   2 2 2020-12-23 07:18:17
12468 2005-08-18 11:41:47.000 1689 1689 80 80 2005-08-24 16:43:47.000 2 2 2020-12-23 07:18:18
13352 2005-08-19 20:51:40.000 2689 2689 80 80 2005-08-24 01:22:40.000 1 1 2020-12-23 07:18:30
13395 2005-08-19 22:05:40.000 53 53 80 80 2005-08-22 01:31:40.000 2 2 2020-12-23 07:18:31
13724 2005-08-20 10:07:28.000 200 200 80 80 2005-08-24 07:47:28.000 2 2 2020-12-23 07:18:36
13851 2005-08-20 14:44:22.000 3278 3278 80 80 2005-08-22 18:10:22.000 1 1 2020-12-23 07:18:38
14916 2005-08-22 04:56:57.000 2110 2110 80 80 2005-08-24 06:36:57.000 2 2 2020-12-23 07:18:53
15648 2005-08-23 08:27:57.000 4039 4039 80 80 2005-08-30 08:53:57.000 2 2 2020-12-23 07:19:04
16012 2005-08-23 21:13:39.000 2421 2421 80 80 2005-08-30 23:52:39.000 2 2 2020-12-23 07:19:09

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