home / sakila

rental

18 rows where customer_id = 97

✎ 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
2083 2005-06-17 17:14:00.000 2423 2423 97 97 2005-06-18 18:31:00.000 2 2 2020-12-23 07:15:48
2790 2005-06-19 18:49:45.000 202 202 97 97 2005-06-21 00:13:45.000 1 1 2020-12-23 07:15:58
3459 2005-06-21 21:45:47.000 3080 3080 97 97 2005-06-25 00:46:47.000 1 1 2020-12-23 07:16:07
3540 2005-07-06 01:47:20.000 1295 1295 97 97 2005-07-08 23:48:20.000 2 2 2020-12-23 07:16:08
3565 2005-07-06 03:02:58.000 599 599 97 97 2005-07-13 21:31:58.000 2 2 2020-12-23 07:16:09
3818 2005-07-06 15:33:31.000 653 653 97 97 2005-07-11 16:35:31.000 1 1 2020-12-23 07:16:13
4312 2005-07-07 17:34:59.000 3870 3870 97 97 2005-07-09 17:45:59.000 2 2 2020-12-23 07:16:20
4508 2005-07-08 02:28:41.000 3996 3996 97 97 2005-07-16 23:59:41.000 1 1 2020-12-23 07:16:23
5454 2005-07-09 22:24:25.000 3049 3049 97 97 2005-07-11 01:52:25.000 1 1 2020-12-23 07:16:37
6544 2005-07-12 04:56:15.000 1218 1218 97 97 2005-07-17 08:28:15.000 1 1 2020-12-23 07:16:53
6726 2005-07-12 13:48:14.000 4494 4494 97 97 2005-07-16 11:11:14.000 1 1 2020-12-23 07:16:55
7182 2005-07-27 08:15:38.000 3209 3209 97 97 2005-08-03 12:48:38.000 2 2 2020-12-23 07:17:02
7924 2005-07-28 12:08:53.000 656 656 97 97 2005-07-30 06:45:53.000 2 2 2020-12-23 07:17:13
8438 2005-07-29 07:25:42.000 720 720 97 97 2005-08-04 07:39:42.000 1 1 2020-12-23 07:17:21
9591 2005-07-31 03:19:28.000 504 504 97 97 2005-08-01 07:30:28.000 1 1 2020-12-23 07:17:38
10820 2005-08-01 22:53:40.000 1487 1487 97 97 2005-08-02 17:59:40.000 2 2 2020-12-23 07:17:55
14323 2005-08-21 08:08:43.000 1257 1257 97 97 2005-08-25 10:44:43.000 1 1 2020-12-23 07:18:45
15006 2005-08-22 08:20:15.000 2967 2967 97 97 2005-08-23 11:57:15.000 1 1 2020-12-23 07:18:55

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