home / sakila

rental

25 rows where customer_id = 369

✎ 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
31 2005-05-25 04:05:17.000 4482 4482 369 369 2005-05-30 07:15:17.000 1 1 2020-12-23 07:15:20
294 2005-05-26 20:29:57.000 2751 2751 369 369 2005-05-28 17:20:57.000 1 1 2020-12-23 07:15:23
854 2005-05-30 01:56:11.000 921 921 369 369 2005-06-01 06:34:11.000 2 2 2020-12-23 07:15:31
913 2005-05-30 11:04:58.000 3213 3213 369 369 2005-06-07 13:22:58.000 2 2 2020-12-23 07:15:32
1224 2005-06-15 03:44:25.000 1572 1572 369 369 2005-06-17 03:49:25.000 2 2 2020-12-23 07:15:36
3490 2005-07-05 23:37:13.000 3041 3041 369 369 2005-07-12 22:07:13.000 1 1 2020-12-23 07:16:08
3903 2005-07-06 19:27:32.000 3614 3614 369 369 2005-07-08 23:27:32.000 1 1 2020-12-23 07:16:14
4859 2005-07-08 18:54:04.000 1939 1939 369 369 2005-07-13 13:04:04.000 1 1 2020-12-23 07:16:28
5043 2005-07-09 03:25:18.000 2979 2979 369 369 2005-07-13 00:57:18.000 2 2 2020-12-23 07:16:31
5496 2005-07-10 00:20:23.000 3182 3182 369 369 2005-07-18 21:10:23.000 2 2 2020-12-23 07:16:38
5561 2005-07-10 03:15:24.000 1048 1048 369 369 2005-07-15 06:46:24.000 1 1 2020-12-23 07:16:39
8236 2005-07-29 00:27:04.000 1901 1901 369 369 2005-07-31 05:02:04.000 2 2 2020-12-23 07:17:18
8826 2005-07-29 22:30:16.000 1800 1800 369 369 2005-07-30 19:43:16.000 1 1 2020-12-23 07:17:27
9032 2005-07-30 06:06:54.000 4448 4448 369 369 2005-08-01 05:27:54.000 1 1 2020-12-23 07:17:30
9089 2005-07-30 08:23:39.000 490 490 369 369 2005-07-31 06:00:39.000 1 1 2020-12-23 07:17:30
9543 2005-07-31 01:43:34.000 956 956 369 369 2005-08-01 06:49:34.000 1 1 2020-12-23 07:17:37
9973 2005-07-31 16:49:31.000 1850 1850 369 369 2005-08-03 22:03:31.000 2 2 2020-12-23 07:17:43
10299 2005-08-01 04:08:04.000 1125 1125 369 369 2005-08-04 08:11:04.000 1 1 2020-12-23 07:17:48
10359 2005-08-01 05:52:21.000 259 259 369 369 2005-08-06 05:52:21.000 2 2 2020-12-23 07:17:49
10713 2005-08-01 18:50:05.000 2030 2030 369 369 2005-08-05 00:43:05.000 2 2 2020-12-23 07:17:54
11084 2005-08-02 07:34:19.000 32 32 369 369 2005-08-07 09:30:19.000 1 1 2020-12-23 07:17:59
11388 2005-08-02 18:35:55.000 477 477 369 369 2005-08-09 21:56:55.000 1 1 2020-12-23 07:18:03
12521 2005-08-18 13:43:07.000 1022 1022 369 369 2005-08-21 07:53:07.000 1 1 2020-12-23 07:18:18
13898 2006-02-14 15:16:03.000 4007 4007 369 369   2 2 2020-12-23 07:18:39
14684 2005-08-21 20:28:26.000 3593 3593 369 369 2005-08-28 19:01:26.000 2 2 2020-12-23 07:18:50

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