home / sakila

rental

30 rows where customer_id = 256

✎ 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
51 2005-05-25 06:49:10.000 1257 1257 256 256 2005-05-26 06:42:10.000 1 1 2020-12-23 07:15:20
232 2005-05-26 11:38:05.000 2945 2945 256 256 2005-05-27 08:42:05.000 2 2 2020-12-23 07:15:23
738 2005-05-29 08:20:08.000 2284 2284 256 256 2005-06-06 08:59:08.000 2 2 2020-12-23 07:15:29
935 2005-05-30 13:29:36.000 2421 2421 256 256 2005-06-02 11:08:36.000 1 1 2020-12-23 07:15:32
1116 2005-05-31 16:10:46.000 1356 1356 256 256 2005-06-01 20:27:46.000 2 2 2020-12-23 07:15:35
1555 2005-06-16 02:17:07.000 4168 4168 256 256 2005-06-22 06:28:07.000 1 1 2020-12-23 07:15:40
1965 2005-06-17 09:17:39.000 480 480 256 256 2005-06-18 12:35:39.000 2 2 2020-12-23 07:15:46
1973 2005-06-17 09:26:15.000 3669 3669 256 256 2005-06-21 10:18:15.000 1 1 2020-12-23 07:15:46
2230 2005-06-18 03:50:49.000 833 833 256 256 2005-06-25 01:12:49.000 2 2 2020-12-23 07:15:50
2380 2005-06-18 15:00:04.000 4413 4413 256 256 2005-06-24 13:29:04.000 2 2 2020-12-23 07:15:52
2561 2005-06-19 03:14:52.000 4128 4128 256 256 2005-06-21 02:42:52.000 2 2 2020-12-23 07:15:55
2839 2005-06-19 22:07:24.000 3856 3856 256 256 2005-06-23 16:37:24.000 2 2 2020-12-23 07:15:59
4130 2005-07-07 07:51:53.000 4170 4170 256 256 2005-07-11 12:41:53.000 2 2 2020-12-23 07:16:17
4182 2005-07-07 10:28:00.000 3080 3080 256 256 2005-07-08 12:50:00.000 1 1 2020-12-23 07:16:18
5179 2005-07-09 10:00:44.000 2995 2995 256 256 2005-07-11 06:52:44.000 1 1 2020-12-23 07:16:33
6298 2005-07-11 17:42:33.000 3906 3906 256 256 2005-07-13 18:14:33.000 2 2 2020-12-23 07:16:49
7661 2005-07-28 02:10:27.000 3060 3060 256 256 2005-08-05 03:45:27.000 2 2 2020-12-23 07:17:10
9424 2005-07-30 21:10:56.000 4499 4499 256 256 2005-08-05 00:01:56.000 1 1 2020-12-23 07:17:35
10759 2005-08-01 20:22:51.000 3528 3528 256 256 2005-08-07 22:07:51.000 1 1 2020-12-23 07:17:54
11011 2005-08-02 05:07:07.000 3981 3981 256 256 2005-08-09 07:16:07.000 1 1 2020-12-23 07:17:58
11628 2005-08-17 04:27:18.000 3656 3656 256 256 2005-08-25 01:12:18.000 2 2 2020-12-23 07:18:06
13457 2005-08-20 00:33:22.000 1220 1220 256 256 2005-08-26 21:37:22.000 2 2 2020-12-23 07:18:32
13651 2005-08-20 07:50:08.000 1082 1082 256 256 2005-08-21 07:11:08.000 1 1 2020-12-23 07:18:35
14003 2005-08-20 20:16:06.000 3165 3165 256 256 2005-08-28 14:36:06.000 1 1 2020-12-23 07:18:41
14036 2005-08-20 21:35:27.000 202 202 256 256 2005-08-23 03:29:27.000 1 1 2020-12-23 07:18:41
14445 2005-08-21 12:07:42.000 3186 3186 256 256 2005-08-22 17:51:42.000 2 2 2020-12-23 07:18:47
14458 2005-08-21 12:47:53.000 1769 1769 256 256 2005-08-30 17:09:53.000 2 2 2020-12-23 07:18:47
15609 2005-08-23 06:56:04.000 1730 1730 256 256 2005-09-01 03:25:04.000 1 1 2020-12-23 07:19:03
15861 2005-08-23 16:15:45.000 1859 1859 256 256 2005-09-01 11:37:45.000 2 2 2020-12-23 07:19:07
15864 2005-08-23 16:18:12.000 3014 3014 256 256 2005-08-29 17:10:12.000 2 2 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 12.029ms