home / sakila

rental

28 rows where customer_id = 283

✎ 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
1749 2005-06-16 16:56:00.000 1554 1554 283 283 2005-06-21 21:02:00.000 2 2 2020-12-23 07:15:43
1796 2005-06-16 20:10:43.000 3229 3229 283 283 2005-06-20 19:12:43.000 1 1 2020-12-23 07:15:44
2333 2005-06-18 10:55:54.000 2323 2323 283 283 2005-06-25 07:09:54.000 2 2 2020-12-23 07:15:52
2685 2005-06-19 12:35:21.000 1170 1170 283 283 2005-06-22 16:58:21.000 1 1 2020-12-23 07:15:57
2849 2005-06-19 23:06:00.000 3628 3628 283 283 2005-06-25 18:36:00.000 1 1 2020-12-23 07:15:59
3534 2005-07-06 01:32:27.000 2055 2055 283 283 2005-07-08 23:14:27.000 1 1 2020-12-23 07:16:08
3568 2005-07-06 03:11:57.000 2084 2084 283 283 2005-07-15 03:14:57.000 1 1 2020-12-23 07:16:09
3590 2005-07-06 04:35:12.000 1510 1510 283 283 2005-07-10 05:14:12.000 2 2 2020-12-23 07:16:09
3672 2005-07-06 09:01:56.000 3883 3883 283 283 2005-07-11 14:18:56.000 1 1 2020-12-23 07:16:11
4683 2005-07-08 10:38:28.000 3464 3464 283 283 2005-07-09 12:07:28.000 1 1 2020-12-23 07:16:26
4876 2005-07-08 19:27:50.000 1959 1959 283 283 2005-07-14 15:42:50.000 1 1 2020-12-23 07:16:29
5989 2005-07-11 00:57:53.000 696 696 283 283 2005-07-15 02:24:53.000 1 1 2020-12-23 07:16:45
6075 2005-07-11 05:03:03.000 2160 2160 283 283 2005-07-12 01:28:03.000 1 1 2020-12-23 07:16:46
6300 2005-07-11 17:50:09.000 1269 1269 283 283 2005-07-18 13:11:09.000 1 1 2020-12-23 07:16:49
6313 2005-07-11 18:29:52.000 2976 2976 283 283 2005-07-14 21:34:52.000 1 1 2020-12-23 07:16:49
6827 2005-07-12 18:33:45.000 1529 1529 283 283 2005-07-13 19:09:45.000 1 1 2020-12-23 07:16:57
7504 2005-07-27 20:24:31.000 3354 3354 283 283 2005-07-30 21:25:31.000 2 2 2020-12-23 07:17:07
7816 2005-07-28 08:14:12.000 1422 1422 283 283 2005-07-30 08:00:12.000 2 2 2020-12-23 07:17:12
9353 2005-07-30 18:30:37.000 3581 3581 283 283 2005-08-06 22:32:37.000 2 2 2020-12-23 07:17:34
9478 2005-07-30 23:12:53.000 1139 1139 283 283 2005-08-04 02:41:53.000 1 1 2020-12-23 07:17:36
9572 2005-07-31 02:44:10.000 1453 1453 283 283 2005-08-01 03:30:10.000 2 2 2020-12-23 07:17:37
9918 2005-07-31 14:55:22.000 2519 2519 283 283 2005-08-04 09:02:22.000 2 2 2020-12-23 07:17:43
11637 2005-08-17 04:36:39.000 479 479 283 283 2005-08-18 02:17:39.000 1 1 2020-12-23 07:18:07
11846 2005-08-17 13:18:29.000 3306 3306 283 283 2005-08-22 18:05:29.000 2 2 2020-12-23 07:18:09
11966 2005-08-17 17:40:04.000 3702 3702 283 283 2005-08-20 15:45:04.000 1 1 2020-12-23 07:18:11
12290 2005-08-18 05:08:03.000 4100 4100 283 283 2005-08-23 08:10:03.000 2 2 2020-12-23 07:18:15
13229 2005-08-19 16:08:33.000 634 634 283 283 2005-08-22 19:54:33.000 2 2 2020-12-23 07:18:29
15837 2005-08-23 15:29:41.000 4388 4388 283 283 2005-08-27 18:17:41.000 1 1 2020-12-23 07:19:07

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 13.721ms