home / sakila

rental

26 rows where customer_id = 44

✎ 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
29 2005-05-25 03:47:12.000 611 611 44 44 2005-05-30 00:31:12.000 2 2 2020-12-23 07:15:20
99 2005-05-25 16:50:20.000 535 535 44 44 2005-05-28 18:52:20.000 1 1 2020-12-23 07:15:21
407 2005-05-27 13:57:38.000 1077 1077 44 44 2005-05-31 18:23:38.000 1 1 2020-12-23 07:15:25
721 2005-05-29 05:28:47.000 1116 1116 44 44 2005-05-31 11:24:47.000 1 1 2020-12-23 07:15:29
904 2005-05-30 10:19:42.000 2466 2466 44 44 2005-06-05 04:58:42.000 2 2 2020-12-23 07:15:32
1497 2005-06-15 21:56:39.000 2958 2958 44 44 2005-06-20 20:32:39.000 1 1 2020-12-23 07:15:40
2369 2005-06-18 14:25:29.000 1515 1515 44 44 2005-06-23 18:45:29.000 2 2 2020-12-23 07:15:52
2809 2005-06-19 19:40:27.000 1786 1786 44 44 2005-06-27 15:28:27.000 2 2 2020-12-23 07:15:58
2866 2005-06-20 00:01:36.000 2718 2718 44 44 2005-06-20 21:39:36.000 1 1 2020-12-23 07:15:59
4390 2005-07-07 20:59:06.000 6 6 44 44 2005-07-09 00:04:06.000 2 2 2020-12-23 07:16:21
4723 2005-07-08 12:44:59.000 965 965 44 44 2005-07-17 07:22:59.000 2 2 2020-12-23 07:16:26
5551 2005-07-10 03:01:09.000 4238 4238 44 44 2005-07-18 02:04:09.000 2 2 2020-12-23 07:16:39
5787 2005-07-10 14:08:49.000 1075 1075 44 44 2005-07-19 18:29:49.000 1 1 2020-12-23 07:16:42
5849 2005-07-10 17:32:33.000 1632 1632 44 44 2005-07-19 22:39:33.000 1 1 2020-12-23 07:16:43
5909 2005-07-10 20:46:13.000 2333 2333 44 44 2005-07-14 18:01:13.000 2 2 2020-12-23 07:16:44
7514 2005-07-27 20:51:49.000 400 400 44 44 2005-07-29 18:21:49.000 2 2 2020-12-23 07:17:07
7526 2005-07-27 21:13:47.000 696 696 44 44 2005-08-05 15:23:47.000 2 2 2020-12-23 07:17:07
8775 2005-07-29 20:05:38.000 1358 1358 44 44 2005-07-30 21:13:38.000 1 1 2020-12-23 07:17:26
8866 2005-07-29 23:58:19.000 1530 1530 44 44 2005-08-01 05:19:19.000 2 2 2020-12-23 07:17:27
11364 2005-08-02 17:53:36.000 4515 4515 44 44 2005-08-03 14:16:36.000 1 1 2020-12-23 07:18:03
12345 2005-08-18 07:16:58.000 2359 2359 44 44 2005-08-25 05:50:58.000 1 1 2020-12-23 07:18:16
12504 2005-08-18 13:17:07.000 4429 4429 44 44 2005-08-24 09:13:07.000 2 2 2020-12-23 07:18:18
12790 2005-08-19 00:16:54.000 1281 1281 44 44 2005-08-26 02:00:54.000 1 1 2020-12-23 07:18:22
12982 2005-08-19 07:06:34.000 1258 1258 44 44 2005-08-21 06:53:34.000 1 1 2020-12-23 07:18:25
13428 2006-02-14 15:16:03.000 106 106 44 44   2 2 2020-12-23 07:18:32
15054 2005-08-22 10:14:33.000 2314 2314 44 44 2005-08-25 15:07:33.000 1 1 2020-12-23 07:18:56

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