home / sakila

rental

30 rows where customer_id = 484

✎ 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
35 2005-05-25 04:24:36.000 1286 1286 484 484 2005-05-27 07:02:36.000 2 2 2020-12-23 07:15:20
668 2005-05-28 21:54:45.000 3528 3528 484 484 2005-05-29 22:32:45.000 1 1 2020-12-23 07:15:28
727 2005-05-29 06:08:15.000 1629 1629 484 484 2005-05-30 07:16:15.000 1 1 2020-12-23 07:15:29
1351 2005-06-15 12:51:03.000 2364 2364 484 484 2005-06-22 07:23:03.000 1 1 2020-12-23 07:15:38
1643 2005-06-16 08:55:35.000 1352 1352 484 484 2005-06-21 05:36:35.000 2 2 2020-12-23 07:15:41
2015 2005-06-17 12:16:29.000 3776 3776 484 484 2005-06-18 14:40:29.000 2 2 2020-12-23 07:15:47
2044 2005-06-17 14:37:57.000 2418 2418 484 484 2005-06-22 17:15:57.000 2 2 2020-12-23 07:15:47
4214 2005-07-07 11:54:33.000 2534 2534 484 484 2005-07-08 10:49:33.000 2 2 2020-12-23 07:16:19
5389 2005-07-09 19:25:45.000 3882 3882 484 484 2005-07-17 13:31:45.000 1 1 2020-12-23 07:16:36
5708 2005-07-10 10:29:19.000 571 571 484 484 2005-07-18 06:50:19.000 1 1 2020-12-23 07:16:41
5852 2005-07-10 17:43:30.000 3890 3890 484 484 2005-07-15 15:05:30.000 2 2 2020-12-23 07:16:43
5866 2005-07-10 18:35:14.000 457 457 484 484 2005-07-19 19:41:14.000 2 2 2020-12-23 07:16:43
5977 2005-07-11 00:16:38.000 4011 4011 484 484 2005-07-19 21:00:38.000 1 1 2020-12-23 07:16:45
6296 2005-07-11 17:34:04.000 4202 4202 484 484 2005-07-17 21:12:04.000 1 1 2020-12-23 07:16:49
6863 2005-07-12 19:58:34.000 229 229 484 484 2005-07-21 16:57:34.000 1 1 2020-12-23 07:16:58
7440 2005-07-27 17:43:27.000 1476 1476 484 484 2005-08-03 22:12:27.000 1 1 2020-12-23 07:17:06
7548 2005-07-27 21:53:18.000 2194 2194 484 484 2005-08-02 17:50:18.000 1 1 2020-12-23 07:17:08
8508 2005-07-29 09:34:38.000 4173 4173 484 484 2005-08-01 14:52:38.000 2 2 2020-12-23 07:17:22
9141 2005-07-30 10:16:04.000 3087 3087 484 484 2005-08-05 08:01:04.000 1 1 2020-12-23 07:17:31
9414 2005-07-30 20:46:02.000 578 578 484 484 2005-08-07 21:23:02.000 2 2 2020-12-23 07:17:35
9769 2005-07-31 09:52:16.000 2958 2958 484 484 2005-08-06 09:26:16.000 1 1 2020-12-23 07:17:40
10166 2005-07-31 23:22:20.000 4304 4304 484 484 2005-08-07 18:06:20.000 2 2 2020-12-23 07:17:46
11871 2005-08-17 14:11:44.000 3013 3013 484 484 2005-08-18 17:50:44.000 1 1 2020-12-23 07:18:10
12024 2005-08-17 19:57:34.000 2398 2398 484 484 2005-08-21 23:00:34.000 2 2 2020-12-23 07:18:12
12771 2005-08-18 23:29:23.000 3076 3076 484 484 2005-08-22 17:31:23.000 2 2 2020-12-23 07:18:22
12993 2005-08-19 07:24:03.000 4225 4225 484 484 2005-08-26 07:15:03.000 2 2 2020-12-23 07:18:25
13160 2005-08-19 13:21:04.000 410 410 484 484 2005-08-22 18:49:04.000 1 1 2020-12-23 07:18:28
13956 2005-08-20 18:08:19.000 3757 3757 484 484 2005-08-29 17:03:19.000 1 1 2020-12-23 07:18:40
15607 2005-08-23 06:54:06.000 4118 4118 484 484 2005-08-26 05:03:06.000 2 2 2020-12-23 07:19:03
16026 2005-08-23 21:49:22.000 467 467 484 484 2005-08-27 00:47:22.000 1 1 2020-12-23 07:19:10

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