home / sakila

rental

26 rows where customer_id = 285

✎ 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
1161 2005-06-14 23:07:08.000 1690 1690 285 285 2005-06-21 17:12:08.000 1 1 2020-12-23 07:15:35
1302 2005-06-15 09:48:37.000 324 324 285 285 2005-06-22 06:18:37.000 1 1 2020-12-23 07:15:37
2249 2005-06-18 05:03:08.000 117 117 285 285 2005-06-26 05:43:08.000 2 2 2020-12-23 07:15:50
4007 2005-07-07 00:26:05.000 2071 2071 285 285 2005-07-15 19:53:05.000 1 1 2020-12-23 07:16:16
5112 2005-07-09 07:04:04.000 3529 3529 285 285 2005-07-13 08:42:04.000 1 1 2020-12-23 07:16:32
5683 2005-07-10 08:52:13.000 4433 4433 285 285 2005-07-19 10:25:13.000 1 1 2020-12-23 07:16:41
6010 2005-07-11 01:52:28.000 771 771 285 285 2005-07-13 03:13:28.000 1 1 2020-12-23 07:16:45
6083 2005-07-11 05:12:49.000 3183 3183 285 285 2005-07-15 00:46:49.000 2 2 2020-12-23 07:16:46
6094 2005-07-11 05:54:42.000 2684 2684 285 285 2005-07-18 08:19:42.000 2 2 2020-12-23 07:16:46
6333 2005-07-11 19:20:16.000 2610 2610 285 285 2005-07-17 15:33:16.000 1 1 2020-12-23 07:16:50
6644 2005-07-12 10:39:39.000 2667 2667 285 285 2005-07-14 11:50:39.000 1 1 2020-12-23 07:16:54
7211 2005-07-27 09:20:00.000 4445 4445 285 285 2005-08-02 14:53:00.000 1 1 2020-12-23 07:17:03
7452 2005-07-27 18:26:39.000 3482 3482 285 285 2005-08-04 17:35:39.000 2 2 2020-12-23 07:17:06
7745 2005-07-28 05:46:28.000 1014 1014 285 285 2005-08-06 07:44:28.000 2 2 2020-12-23 07:17:11
8154 2005-07-28 20:56:18.000 1180 1180 285 285 2005-08-01 21:56:18.000 2 2 2020-12-23 07:17:17
8466 2005-07-29 08:24:47.000 4010 4010 285 285 2005-07-31 03:43:47.000 1 1 2020-12-23 07:17:21
10493 2005-08-01 10:43:12.000 2375 2375 285 285 2005-08-07 08:13:12.000 2 2 2020-12-23 07:17:51
10628 2005-08-01 15:33:19.000 427 427 285 285 2005-08-05 17:27:19.000 1 1 2020-12-23 07:17:53
10641 2005-08-01 15:44:57.000 972 972 285 285 2005-08-04 18:15:57.000 2 2 2020-12-23 07:17:53
12027 2005-08-17 20:01:12.000 45 45 285 285 2005-08-26 21:08:12.000 2 2 2020-12-23 07:18:12
12444 2005-08-18 10:53:12.000 1639 1639 285 285 2005-08-19 13:54:12.000 2 2 2020-12-23 07:18:17
12449 2005-08-18 11:03:04.000 663 663 285 285 2005-08-19 07:34:04.000 1 1 2020-12-23 07:18:17
12687 2005-08-18 19:57:39.000 3092 3092 285 285 2005-08-27 01:36:39.000 2 2 2020-12-23 07:18:20
13102 2005-08-19 11:02:03.000 2885 2885 285 285 2005-08-28 13:05:03.000 2 2 2020-12-23 07:18:27
15251 2005-08-22 18:03:57.000 1994 1994 285 285 2005-08-23 20:56:57.000 2 2 2020-12-23 07:18:58
15489 2005-08-23 02:06:41.000 764 764 285 285 2005-08-25 06:50:41.000 1 1 2020-12-23 07:19:02

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