home / sakila

rental

22 rows where customer_id = 443

✎ 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
1068 2005-05-31 09:32:15.000 150 150 443 443 2005-06-01 11:20:15.000 1 1 2020-12-23 07:15:34
2871 2005-06-20 00:27:49.000 1731 1731 443 443 2005-06-29 01:36:49.000 1 1 2020-12-23 07:15:59
3510 2005-07-06 00:27:41.000 2250 2250 443 443 2005-07-14 23:20:41.000 2 2 2020-12-23 07:16:08
6625 2005-07-12 09:06:40.000 735 735 443 443 2005-07-21 04:57:40.000 2 2 2020-12-23 07:16:54
6913 2005-07-12 22:18:12.000 569 569 443 443 2005-07-14 23:03:12.000 2 2 2020-12-23 07:16:58
6983 2005-07-27 00:55:03.000 1758 1758 443 443 2005-08-01 21:19:03.000 2 2 2020-12-23 07:16:59
7317 2005-07-27 13:19:41.000 1518 1518 443 443 2005-07-29 16:16:41.000 2 2 2020-12-23 07:17:04
7667 2005-07-28 02:37:22.000 2415 2415 443 443 2005-08-05 21:37:22.000 1 1 2020-12-23 07:17:10
7987 2005-07-28 14:36:52.000 288 288 443 443 2005-08-05 16:49:52.000 2 2 2020-12-23 07:17:14
9740 2005-07-31 09:08:03.000 3497 3497 443 443 2005-08-06 04:48:03.000 2 2 2020-12-23 07:17:40
10014 2005-07-31 18:10:56.000 2344 2344 443 443 2005-08-02 23:36:56.000 1 1 2020-12-23 07:17:44
10081 2005-07-31 20:07:44.000 3183 3183 443 443 2005-08-06 20:04:44.000 1 1 2020-12-23 07:17:45
10360 2005-08-01 05:52:53.000 1129 1129 443 443 2005-08-05 10:55:53.000 1 1 2020-12-23 07:17:49
11449 2005-08-02 20:44:43.000 3279 3279 443 443 2005-08-07 23:47:43.000 2 2 2020-12-23 07:18:04
12415 2005-08-18 09:54:01.000 392 392 443 443 2005-08-24 15:41:01.000 1 1 2020-12-23 07:18:17
12857 2005-08-19 02:20:13.000 4307 4307 443 443 2005-08-20 20:20:13.000 1 1 2020-12-23 07:18:23
13489 2005-08-20 01:29:06.000 2934 2934 443 443 2005-08-27 21:11:06.000 1 1 2020-12-23 07:18:33
14561 2005-08-21 16:20:43.000 2498 2498 443 443 2005-08-27 16:48:43.000 1 1 2020-12-23 07:18:49
14611 2005-08-21 18:01:41.000 4078 4078 443 443 2005-08-26 12:34:41.000 1 1 2020-12-23 07:18:49
15182 2005-08-22 15:47:05.000 645 645 443 443 2005-08-25 11:55:05.000 1 1 2020-12-23 07:18:57
15393 2005-08-22 23:04:09.000 2924 2924 443 443 2005-08-27 02:23:09.000 2 2 2020-12-23 07:19:01
15519 2005-08-23 03:23:32.000 542 542 443 443 2005-08-25 03:48:32.000 1 1 2020-12-23 07:19:02

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