home / sakila

rental

24 rows where customer_id = 527

✎ 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
1398 2005-06-15 16:28:42.000 4402 4402 527 527 2005-06-16 12:11:42.000 1 1 2020-12-23 07:15:38
2422 2005-06-18 17:28:57.000 3170 3170 527 527 2005-06-23 15:22:57.000 1 1 2020-12-23 07:15:53
2496 2005-06-18 22:20:11.000 646 646 527 527 2005-06-20 03:08:11.000 2 2 2020-12-23 07:15:54
2539 2005-06-19 01:58:39.000 4474 4474 527 527 2005-06-19 22:17:39.000 2 2 2020-12-23 07:15:54
4888 2005-07-08 20:04:27.000 1220 1220 527 527 2005-07-10 14:53:27.000 2 2 2020-12-23 07:16:29
5365 2005-07-09 18:27:00.000 4469 4469 527 527 2005-07-11 14:18:00.000 1 1 2020-12-23 07:16:36
6003 2005-07-11 01:28:33.000 296 296 527 527 2005-07-17 21:24:33.000 1 1 2020-12-23 07:16:45
6011 2005-07-11 01:54:48.000 3899 3899 527 527 2005-07-18 07:17:48.000 2 2 2020-12-23 07:16:45
6050 2005-07-11 03:34:29.000 825 825 527 527 2005-07-15 02:55:29.000 1 1 2020-12-23 07:16:46
6975 2005-07-27 00:39:54.000 3328 3328 527 527 2005-08-02 19:49:54.000 1 1 2020-12-23 07:16:59
7506 2005-07-27 20:28:34.000 2091 2091 527 527 2005-08-05 18:14:34.000 1 1 2020-12-23 07:17:07
8854 2005-07-29 23:40:07.000 1365 1365 527 527 2005-08-01 00:35:07.000 2 2 2020-12-23 07:17:27
9750 2005-07-31 09:19:46.000 3174 3174 527 527 2005-08-06 08:07:46.000 1 1 2020-12-23 07:17:40
10486 2005-08-01 10:23:43.000 2454 2454 527 527 2005-08-05 07:11:43.000 2 2 2020-12-23 07:17:51
10613 2005-08-01 14:56:14.000 4357 4357 527 527 2005-08-07 09:33:14.000 1 1 2020-12-23 07:17:52
11013 2005-08-02 05:10:54.000 2993 2993 527 527 2005-08-10 08:59:54.000 1 1 2020-12-23 07:17:58
11150 2005-08-02 09:51:46.000 2193 2193 527 527 2005-08-05 09:03:46.000 2 2 2020-12-23 07:18:00
11624 2005-08-17 04:17:42.000 606 606 527 527 2005-08-18 02:46:42.000 1 1 2020-12-23 07:18:06
12136 2005-08-17 23:51:30.000 3944 3944 527 527 2005-08-23 01:35:30.000 1 1 2020-12-23 07:18:13
12513 2005-08-18 13:31:45.000 29 29 527 527 2005-08-25 08:26:45.000 1 1 2020-12-23 07:18:18
14267 2006-02-14 15:16:03.000 2199 2199 527 527   2 2 2020-12-23 07:18:45
14352 2005-08-21 09:06:29.000 1224 1224 527 527 2005-08-28 13:36:29.000 1 1 2020-12-23 07:18:46
15144 2005-08-22 13:49:18.000 559 559 527 527 2005-08-26 11:11:18.000 2 2 2020-12-23 07:18:57
15552 2005-08-23 04:33:23.000 4347 4347 527 527 2005-09-01 10:25:23.000 2 2 2020-12-23 07:19:03

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