home / sakila

rental

26 rows where customer_id = 518

✎ 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
710 2005-05-29 03:48:36.000 194 194 518 518 2005-06-03 05:03:36.000 1 1 2020-12-23 07:15:29
1552 2005-06-16 02:01:37.000 819 819 518 518 2005-06-21 00:59:37.000 2 2 2020-12-23 07:15:40
3311 2005-06-21 08:05:27.000 3438 3438 518 518 2005-06-22 06:51:27.000 2 2 2020-12-23 07:16:05
3652 2005-07-06 07:44:30.000 1231 1231 518 518 2005-07-08 04:41:30.000 1 1 2020-12-23 07:16:10
4029 2005-07-07 02:19:44.000 4075 4075 518 518 2005-07-15 02:30:44.000 2 2 2020-12-23 07:16:16
4661 2005-07-08 09:55:06.000 2641 2641 518 518 2005-07-11 08:26:06.000 1 1 2020-12-23 07:16:25
4948 2005-07-08 22:54:21.000 2972 2972 518 518 2005-07-17 03:52:21.000 2 2 2020-12-23 07:16:30
6652 2005-07-12 10:59:38.000 2200 2200 518 518 2005-07-13 13:52:38.000 1 1 2020-12-23 07:16:54
6957 2005-07-27 00:00:00.000 2231 2231 518 518 2005-07-29 19:32:00.000 2 2 2020-12-23 07:16:59
7038 2005-07-27 03:07:29.000 1909 1909 518 518 2005-07-31 04:55:29.000 2 2 2020-12-23 07:17:00
7154 2005-07-27 07:16:17.000 2019 2019 518 518 2005-07-28 04:04:17.000 2 2 2020-12-23 07:17:02
7382 2005-07-27 15:43:15.000 356 356 518 518 2005-07-28 11:18:15.000 2 2 2020-12-23 07:17:05
7657 2005-07-28 02:09:00.000 2319 2319 518 518 2005-08-04 21:44:00.000 1 1 2020-12-23 07:17:10
7839 2005-07-28 09:01:13.000 914 914 518 518 2005-08-04 11:46:13.000 1 1 2020-12-23 07:17:12
8107 2005-07-28 19:03:16.000 1318 1318 518 518 2005-08-05 17:18:16.000 2 2 2020-12-23 07:17:16
8397 2005-07-29 06:09:35.000 3542 3542 518 518 2005-08-01 02:08:35.000 1 1 2020-12-23 07:17:20
10751 2005-08-01 20:06:10.000 3257 3257 518 518 2005-08-10 22:36:10.000 2 2 2020-12-23 07:17:54
11433 2005-08-02 20:13:10.000 1 1 518 518 2005-08-11 21:35:10.000 1 1 2020-12-23 07:18:04
12450 2005-08-18 11:04:04.000 3439 3439 518 518 2005-08-22 07:24:04.000 1 1 2020-12-23 07:18:17
12681 2005-08-18 19:48:06.000 1570 1570 518 518 2005-08-23 15:05:06.000 2 2 2020-12-23 07:18:20
13065 2005-08-19 09:48:52.000 1887 1887 518 518 2005-08-22 07:12:52.000 1 1 2020-12-23 07:18:26
13539 2005-08-20 03:40:27.000 3110 3110 518 518 2005-08-27 07:15:27.000 1 1 2020-12-23 07:18:33
14088 2005-08-20 23:57:24.000 1184 1184 518 518 2005-08-28 21:49:24.000 1 1 2020-12-23 07:18:42
14149 2005-08-21 02:22:47.000 3371 3371 518 518 2005-08-24 02:36:47.000 1 1 2020-12-23 07:18:43
14980 2005-08-22 07:16:45.000 2701 2701 518 518 2005-08-26 06:04:45.000 2 2 2020-12-23 07:18:54
15434 2005-08-23 00:28:16.000 4378 4378 518 518 2005-08-26 04:27:16.000 2 2 2020-12-23 07:19:01

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