home / sakila

rental

26 rows where customer_id = 486

✎ 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
909 2005-05-30 10:43:38.000 3775 3775 486 486 2005-06-08 12:07:38.000 1 1 2020-12-23 07:15:32
946 2005-05-30 15:35:08.000 1264 1264 486 486 2005-06-08 11:38:08.000 1 1 2020-12-23 07:15:32
1129 2005-05-31 18:00:48.000 386 386 486 486 2005-06-04 23:05:48.000 1 1 2020-12-23 07:15:35
2036 2005-06-17 13:46:52.000 100 100 486 486 2005-06-18 15:42:52.000 2 2 2020-12-23 07:15:47
2102 2005-06-17 19:05:22.000 2316 2316 486 486 2005-06-23 23:21:22.000 2 2 2020-12-23 07:15:48
2566 2005-06-19 03:45:39.000 495 495 486 486 2005-06-25 08:43:39.000 2 2 2020-12-23 07:15:55
2797 2005-06-19 19:04:32.000 3222 3222 486 486 2005-06-20 22:43:32.000 1 1 2020-12-23 07:15:58
3835 2005-07-06 16:22:45.000 935 935 486 486 2005-07-11 17:04:45.000 2 2 2020-12-23 07:16:13
4110 2005-07-07 06:44:27.000 226 226 486 486 2005-07-12 05:43:27.000 2 2 2020-12-23 07:16:17
4205 2005-07-07 11:25:39.000 3922 3922 486 486 2005-07-11 06:12:39.000 1 1 2020-12-23 07:16:19
4381 2005-07-07 20:37:53.000 3727 3727 486 486 2005-07-10 16:54:53.000 1 1 2020-12-23 07:16:21
4772 2005-07-08 15:41:11.000 2156 2156 486 486 2005-07-17 15:25:11.000 1 1 2020-12-23 07:16:27
5006 2005-07-09 01:24:07.000 1277 1277 486 486 2005-07-18 03:56:07.000 1 1 2020-12-23 07:16:31
6383 2005-07-11 22:06:53.000 4275 4275 486 486 2005-07-17 16:09:53.000 1 1 2020-12-23 07:16:50
7127 2005-07-27 06:13:48.000 273 273 486 486 2005-08-01 02:50:48.000 2 2 2020-12-23 07:17:02
7446 2005-07-27 18:00:24.000 2337 2337 486 486 2005-07-29 13:40:24.000 1 1 2020-12-23 07:17:06
8425 2005-07-29 07:06:21.000 3491 3491 486 486 2005-08-05 07:57:21.000 2 2 2020-12-23 07:17:21
9142 2005-07-30 10:21:03.000 4467 4467 486 486 2005-08-04 15:14:03.000 1 1 2020-12-23 07:17:31
10079 2005-07-31 20:05:45.000 4541 4541 486 486 2005-08-04 16:25:45.000 2 2 2020-12-23 07:17:45
10902 2005-08-02 01:35:46.000 3863 3863 486 486 2005-08-09 01:59:46.000 1 1 2020-12-23 07:17:56
12465 2005-08-18 11:35:02.000 1733 1733 486 486 2005-08-21 11:52:02.000 2 2 2020-12-23 07:18:18
12609 2005-08-18 17:06:22.000 2327 2327 486 486 2005-08-20 21:30:22.000 1 1 2020-12-23 07:18:19
13048 2005-08-19 09:25:06.000 1029 1029 486 486 2005-08-28 11:18:06.000 2 2 2020-12-23 07:18:26
13803 2005-08-20 12:46:17.000 1084 1084 486 486 2005-08-24 15:44:17.000 2 2 2020-12-23 07:18:38
14251 2005-08-21 05:42:20.000 139 139 486 486 2005-08-26 06:20:20.000 2 2 2020-12-23 07:18:44
14284 2005-08-21 06:44:37.000 633 633 486 486 2005-08-28 05:03:37.000 1 1 2020-12-23 07:18:45

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