home / sakila

rental

23 rows where customer_id = 379

✎ 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
209 2005-05-26 08:14:01.000 729 729 379 379 2005-05-27 09:00:01.000 1 1 2020-12-23 07:15:22
863 2005-05-30 03:14:59.000 3999 3999 379 379 2005-06-05 04:34:59.000 2 2 2020-12-23 07:15:31
1383 2005-06-15 15:20:06.000 1281 1281 379 379 2005-06-24 18:42:06.000 2 2 2020-12-23 07:15:38
2313 2005-06-18 08:56:45.000 3134 3134 379 379 2005-06-26 10:30:45.000 2 2 2020-12-23 07:15:51
2926 2005-06-20 04:37:45.000 1055 1055 379 379 2005-06-26 02:17:45.000 1 1 2020-12-23 07:16:00
3788 2005-07-06 14:02:02.000 1363 1363 379 379 2005-07-10 18:24:02.000 1 1 2020-12-23 07:16:12
4740 2005-07-08 13:30:35.000 2559 2559 379 379 2005-07-14 18:43:35.000 1 1 2020-12-23 07:16:27
5402 2005-07-09 20:01:58.000 4450 4450 379 379 2005-07-10 14:07:58.000 1 1 2020-12-23 07:16:36
6235 2005-07-11 14:17:51.000 2659 2659 379 379 2005-07-17 11:14:51.000 2 2 2020-12-23 07:16:48
7041 2005-07-27 03:18:32.000 4212 4212 379 379 2005-07-30 06:40:32.000 2 2 2020-12-23 07:17:00
10041 2005-07-31 19:01:02.000 2994 2994 379 379 2005-08-07 21:32:02.000 1 1 2020-12-23 07:17:44
11457 2005-08-02 21:14:16.000 1642 1642 379 379 2005-08-10 02:39:16.000 2 2 2020-12-23 07:18:04
12503 2005-08-18 13:16:46.000 3548 3548 379 379 2005-08-19 10:24:46.000 2 2 2020-12-23 07:18:18
13334 2005-08-19 20:02:33.000 461 461 379 379 2005-08-22 00:45:33.000 1 1 2020-12-23 07:18:30
13397 2005-08-19 22:06:35.000 3863 3863 379 379 2005-08-29 01:11:35.000 2 2 2020-12-23 07:18:31
13485 2005-08-20 01:20:14.000 3802 3802 379 379 2005-08-22 01:28:14.000 2 2 2020-12-23 07:18:33
14011 2005-08-20 20:32:56.000 1212 1212 379 379 2005-08-28 21:44:56.000 1 1 2020-12-23 07:18:41
14152 2005-08-21 02:23:50.000 2561 2561 379 379 2005-08-25 06:05:50.000 1 1 2020-12-23 07:18:43
14470 2005-08-21 13:09:41.000 3899 3899 379 379 2005-08-23 10:20:41.000 2 2 2020-12-23 07:18:47
14886 2005-08-22 03:59:01.000 4330 4330 379 379 2005-08-23 01:22:01.000 1 1 2020-12-23 07:18:53
15399 2005-08-22 23:11:59.000 3858 3858 379 379 2005-08-26 22:16:59.000 2 2 2020-12-23 07:19:01
15446 2005-08-23 00:49:24.000 503 503 379 379 2005-08-26 02:09:24.000 2 2 2020-12-23 07:19:01
15930 2005-08-23 18:26:51.000 180 180 379 379 2005-08-31 16:12:51.000 1 1 2020-12-23 07:19:08

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