home / sakila

rental

28 rows where customer_id = 457

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
1024 2005-05-31 03:30:19.000 2310 2310 457 457 2005-06-09 05:52:19.000 2 2 2020-12-23 07:15:33
1453 2005-06-15 19:36:39.000 3274 3274 457 457 2005-06-19 00:16:39.000 2 2 2020-12-23 07:15:39
1727 2005-06-16 15:21:47.000 2951 2951 457 457 2005-06-17 14:12:47.000 1 1 2020-12-23 07:15:43
2030 2005-06-17 13:13:27.000 4024 4024 457 457 2005-06-19 10:44:27.000 1 1 2020-12-23 07:15:47
2172 2005-06-18 00:06:16.000 2912 2912 457 457 2005-06-26 00:50:16.000 1 1 2020-12-23 07:15:49
2670 2005-06-19 11:30:16.000 3518 3518 457 457 2005-06-21 17:25:16.000 2 2 2020-12-23 07:15:56
2762 2005-06-19 17:22:31.000 3431 3431 457 457 2005-06-25 22:43:31.000 2 2 2020-12-23 07:15:58
2811 2005-06-19 19:53:30.000 3890 3890 457 457 2005-06-22 23:21:30.000 2 2 2020-12-23 07:15:58
3115 2005-06-20 17:59:05.000 2193 2193 457 457 2005-06-26 13:28:05.000 1 1 2020-12-23 07:16:02
3184 2005-06-20 22:57:44.000 3179 3179 457 457 2005-06-29 20:57:44.000 1 1 2020-12-23 07:16:03
4600 2005-07-08 06:48:37.000 1526 1526 457 457 2005-07-15 10:11:37.000 1 1 2020-12-23 07:16:25
5500 2005-07-10 00:28:17.000 3380 3380 457 457 2005-07-15 19:09:17.000 1 1 2020-12-23 07:16:38
6467 2005-07-12 01:22:03.000 2067 2067 457 457 2005-07-20 04:37:03.000 2 2 2020-12-23 07:16:52
7184 2005-07-27 08:22:26.000 2324 2324 457 457 2005-08-02 09:34:26.000 2 2 2020-12-23 07:17:02
8373 2005-07-29 05:19:53.000 2070 2070 457 457 2005-08-04 04:39:53.000 1 1 2020-12-23 07:17:20
8502 2005-07-29 09:15:41.000 2149 2149 457 457 2005-07-30 10:41:41.000 1 1 2020-12-23 07:17:22
10049 2005-07-31 19:11:11.000 854 854 457 457 2005-08-03 22:15:11.000 1 1 2020-12-23 07:17:44
11956 2005-08-17 17:22:05.000 2533 2533 457 457 2005-08-25 22:19:05.000 2 2 2020-12-23 07:18:11
12115 2005-08-17 23:04:15.000 1228 1228 457 457 2005-08-20 22:25:15.000 2 2 2020-12-23 07:18:13
12171 2005-08-18 01:06:13.000 454 454 457 457 2005-08-22 19:39:13.000 2 2 2020-12-23 07:18:14
12645 2006-02-14 15:16:03.000 1658 1658 457 457   1 1 2020-12-23 07:18:20
13088 2005-08-19 10:36:11.000 4281 4281 457 457 2005-08-21 09:12:11.000 1 1 2020-12-23 07:18:26
13150 2005-08-19 13:08:19.000 1514 1514 457 457 2005-08-25 18:00:19.000 1 1 2020-12-23 07:18:27
13934 2005-08-20 17:18:48.000 4567 4567 457 457 2005-08-26 15:31:48.000 1 1 2020-12-23 07:18:40
14327 2005-08-21 08:18:18.000 553 553 457 457 2005-08-30 02:21:18.000 2 2 2020-12-23 07:18:45
14365 2005-08-21 09:25:13.000 618 618 457 457 2005-08-27 11:48:13.000 1 1 2020-12-23 07:18:46
14516 2006-02-14 15:16:03.000 713 713 457 457   2 2 2020-12-23 07:18:48
15128 2005-08-22 12:57:26.000 3229 3229 457 457 2005-08-30 11:35:26.000 2 2 2020-12-23 07:18:57

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