home / sakila

rental

27 rows where customer_id = 577

✎ 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
291 2005-05-26 20:20:47.000 485 485 577 577 2005-06-03 02:06:47.000 2 2 2020-12-23 07:15:23
2399 2005-06-18 16:06:14.000 2492 2492 577 577 2005-06-26 16:56:14.000 2 2 2020-12-23 07:15:53
3286 2005-06-21 06:31:29.000 742 742 577 577 2005-06-25 00:46:29.000 2 2 2020-12-23 07:16:05
3401 2005-06-21 15:52:43.000 3423 3423 577 577 2005-06-30 21:09:43.000 2 2 2020-12-23 07:16:06
3599 2005-07-06 05:16:36.000 3262 3262 577 577 2005-07-13 07:14:36.000 2 2 2020-12-23 07:16:09
3785 2005-07-06 14:00:13.000 3279 3279 577 577 2005-07-14 10:13:13.000 2 2 2020-12-23 07:16:12
4922 2005-07-08 21:44:00.000 2928 2928 577 577 2005-07-10 02:58:00.000 2 2 2020-12-23 07:16:29
6500 2005-07-12 03:11:23.000 4521 4521 577 577 2005-07-13 00:51:23.000 2 2 2020-12-23 07:16:52
6534 2005-07-12 04:39:43.000 2359 2359 577 577 2005-07-16 06:33:43.000 1 1 2020-12-23 07:16:53
7197 2005-07-27 08:49:32.000 2109 2109 577 577 2005-07-31 13:50:32.000 1 1 2020-12-23 07:17:03
7371 2005-07-27 15:18:42.000 1807 1807 577 577 2005-08-01 09:58:42.000 1 1 2020-12-23 07:17:05
7876 2005-07-28 10:24:22.000 3563 3563 577 577 2005-08-04 07:15:22.000 1 1 2020-12-23 07:17:13
8043 2005-07-28 16:45:44.000 208 208 577 577 2005-08-01 12:26:44.000 1 1 2020-12-23 07:17:15
8060 2005-07-28 17:10:02.000 3765 3765 577 577 2005-08-05 17:11:02.000 1 1 2020-12-23 07:17:15
8671 2005-07-29 15:49:37.000 1431 1431 577 577 2005-08-05 18:20:37.000 1 1 2020-12-23 07:17:24
10323 2005-08-01 04:44:58.000 3539 3539 577 577 2005-08-06 07:56:58.000 1 1 2020-12-23 07:17:48
10487 2005-08-01 10:26:34.000 1121 1121 577 577 2005-08-07 16:11:34.000 1 1 2020-12-23 07:17:51
10782 2005-08-01 21:23:25.000 1507 1507 577 577 2005-08-03 20:15:25.000 2 2 2020-12-23 07:17:55
11054 2005-08-02 06:33:07.000 728 728 577 577 2005-08-10 02:52:07.000 2 2 2020-12-23 07:17:58
11464 2005-08-02 21:42:07.000 538 538 577 577 2005-08-03 21:44:07.000 2 2 2020-12-23 07:18:04
12664 2005-08-18 19:10:54.000 2732 2732 577 577 2005-08-25 19:19:54.000 1 1 2020-12-23 07:18:20
12671 2005-08-18 19:19:59.000 1734 1734 577 577 2005-08-23 17:53:59.000 2 2 2020-12-23 07:18:20
13200 2005-08-19 14:55:58.000 2746 2746 577 577 2005-08-27 11:35:58.000 2 2 2020-12-23 07:18:28
13500 2005-08-20 01:54:39.000 1353 1353 577 577 2005-08-25 21:23:39.000 1 1 2020-12-23 07:18:33
15480 2005-08-23 01:57:20.000 3298 3298 577 577 2005-08-26 04:43:20.000 2 2 2020-12-23 07:19:02
15873 2005-08-23 16:27:59.000 4548 4548 577 577 2005-08-26 11:11:59.000 2 2 2020-12-23 07:19:07
16003 2005-08-23 20:47:28.000 3413 3413 577 577 2005-08-31 23:22:28.000 1 1 2020-12-23 07:19:09

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