home / sakila

rental

28 rows where customer_id = 49

✎ 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
96 2005-05-25 16:32:19.000 3418 3418 49 49 2005-05-30 10:47:19.000 2 2 2020-12-23 07:15:21
239 2005-05-26 12:30:26.000 131 131 49 49 2005-06-01 13:26:26.000 2 2 2020-12-23 07:15:23
846 2005-05-30 01:17:45.000 938 938 49 49 2005-06-01 00:56:45.000 2 2 2020-12-23 07:15:31
1010 2005-05-31 01:57:32.000 4038 4038 49 49 2005-06-01 06:50:32.000 2 2 2020-12-23 07:15:33
1164 2005-06-14 23:16:26.000 3691 3691 49 49 2005-06-16 21:00:26.000 1 1 2020-12-23 07:15:35
1237 2005-06-15 04:44:10.000 3249 3249 49 49 2005-06-23 07:00:10.000 2 2 2020-12-23 07:15:36
1688 2005-06-16 12:11:20.000 383 383 49 49 2005-06-18 08:39:20.000 2 2 2020-12-23 07:15:42
1777 2005-06-16 18:52:12.000 3325 3325 49 49 2005-06-25 13:55:12.000 1 1 2020-12-23 07:15:43
3235 2005-06-21 02:46:17.000 212 212 49 49 2005-06-22 20:58:17.000 1 1 2020-12-23 07:16:04
3575 2005-07-06 03:36:19.000 3234 3234 49 49 2005-07-08 06:21:19.000 1 1 2020-12-23 07:16:09
3615 2005-07-06 05:47:47.000 711 711 49 49 2005-07-11 05:01:47.000 1 1 2020-12-23 07:16:10
5491 2005-07-10 00:09:45.000 2007 2007 49 49 2005-07-11 02:25:45.000 1 1 2020-12-23 07:16:38
6214 2005-07-11 12:49:48.000 1258 1258 49 49 2005-07-18 07:41:48.000 2 2 2020-12-23 07:16:48
6279 2005-07-11 16:26:07.000 1254 1254 49 49 2005-07-17 21:05:07.000 2 2 2020-12-23 07:16:49
6521 2005-07-12 04:06:11.000 3293 3293 49 49 2005-07-21 05:50:11.000 1 1 2020-12-23 07:16:52
6759 2005-07-12 15:14:48.000 3624 3624 49 49 2005-07-15 11:29:48.000 1 1 2020-12-23 07:16:56
7209 2005-07-27 09:16:53.000 3766 3766 49 49 2005-07-30 08:09:53.000 2 2 2020-12-23 07:17:03
7742 2005-07-28 05:33:16.000 1808 1808 49 49 2005-08-06 01:04:16.000 2 2 2020-12-23 07:17:11
8553 2005-07-29 11:15:36.000 2645 2645 49 49 2005-08-07 16:37:36.000 1 1 2020-12-23 07:17:23
9006 2005-07-30 05:06:32.000 3315 3315 49 49 2005-07-31 08:24:32.000 1 1 2020-12-23 07:17:29
9851 2005-07-31 12:50:24.000 25 25 49 49 2005-08-08 08:30:24.000 2 2 2020-12-23 07:17:42
10144 2005-07-31 22:13:52.000 3011 3011 49 49 2005-08-05 19:27:52.000 1 1 2020-12-23 07:17:46
10266 2005-08-01 03:05:59.000 476 476 49 49 2005-08-06 06:23:59.000 1 1 2020-12-23 07:17:47
10588 2005-08-01 14:10:21.000 2384 2384 49 49 2005-08-03 13:47:21.000 2 2 2020-12-23 07:17:52
10814 2005-08-01 22:43:12.000 2758 2758 49 49 2005-08-05 02:35:12.000 2 2 2020-12-23 07:17:55
14168 2005-08-21 03:00:03.000 1321 1321 49 49 2005-08-29 06:04:03.000 2 2 2020-12-23 07:18:43
14627 2005-08-21 18:35:54.000 2470 2470 49 49 2005-08-30 21:17:54.000 1 1 2020-12-23 07:18:49
14676 2005-08-21 20:02:18.000 877 877 49 49 2005-08-26 21:55:18.000 1 1 2020-12-23 07:18:50

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