home / sakila

rental

18 rows where customer_id = 344

✎ 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
157 2005-05-26 01:25:21.000 887 887 344 344 2005-05-26 21:17:21.000 2 2 2020-12-23 07:15:22
813 2005-05-29 20:14:34.000 4554 4554 344 344 2005-06-05 20:56:34.000 1 1 2020-12-23 07:15:30
1341 2005-06-15 12:26:18.000 3363 3363 344 344 2005-06-21 07:26:18.000 2 2 2020-12-23 07:15:37
1475 2005-06-15 21:08:01.000 1834 1834 344 344 2005-06-18 22:33:01.000 2 2 2020-12-23 07:15:39
1731 2005-06-16 15:32:12.000 3698 3698 344 344 2005-06-19 18:58:12.000 2 2 2020-12-23 07:15:43
4028 2005-07-07 02:19:14.000 1651 1651 344 344 2005-07-15 08:09:14.000 2 2 2020-12-23 07:16:16
4347 2005-07-07 18:58:57.000 1964 1964 344 344 2005-07-14 16:35:57.000 2 2 2020-12-23 07:16:21
6363 2005-07-11 21:13:19.000 4167 4167 344 344 2005-07-20 15:44:19.000 1 1 2020-12-23 07:16:50
7480 2005-07-27 19:19:53.000 452 452 344 344 2005-08-02 01:01:53.000 1 1 2020-12-23 07:17:07
8561 2005-07-29 11:29:12.000 2207 2207 344 344 2005-08-05 09:17:12.000 1 1 2020-12-23 07:17:23
9788 2005-07-31 10:28:21.000 4367 4367 344 344 2005-08-09 13:45:21.000 1 1 2020-12-23 07:17:41
11116 2005-08-02 08:34:40.000 434 434 344 344 2005-08-09 04:56:40.000 1 1 2020-12-23 07:17:59
12183 2005-08-18 01:34:13.000 3153 3153 344 344 2005-08-24 04:38:13.000 1 1 2020-12-23 07:18:14
13014 2005-08-19 07:56:08.000 3400 3400 344 344 2005-08-21 10:20:08.000 2 2 2020-12-23 07:18:25
13033 2005-08-19 08:34:39.000 1682 1682 344 344 2005-08-28 10:13:39.000 1 1 2020-12-23 07:18:26
14621 2005-08-21 18:17:59.000 3622 3622 344 344 2005-08-23 14:16:59.000 1 1 2020-12-23 07:18:49
14624 2005-08-21 18:32:42.000 4 4 344 344 2005-08-23 21:09:42.000 1 1 2020-12-23 07:18:49
15215 2005-08-22 16:55:26.000 1906 1906 344 344 2005-08-25 20:19:26.000 1 1 2020-12-23 07:18:58

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