home / sakila

rental

29 rows where customer_id = 482

✎ 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
259 2005-05-26 15:32:46.000 30 30 482 482 2005-06-04 15:27:46.000 2 2 2020-12-23 07:15:23
680 2005-05-28 23:27:26.000 4147 4147 482 482 2005-06-02 02:28:26.000 2 2 2020-12-23 07:15:28
879 2005-05-30 05:49:42.000 4021 4021 482 482 2005-06-05 01:45:42.000 2 2 2020-12-23 07:15:31
3048 2005-06-20 12:49:55.000 4389 4389 482 482 2005-06-26 11:06:55.000 1 1 2020-12-23 07:16:01
3255 2005-06-21 03:39:52.000 2564 2564 482 482 2005-06-24 04:02:52.000 1 1 2020-12-23 07:16:04
3650 2005-07-06 07:34:15.000 3606 3606 482 482 2005-07-08 01:50:15.000 2 2 2020-12-23 07:16:10
4768 2005-07-08 15:28:20.000 2787 2787 482 482 2005-07-09 11:46:20.000 1 1 2020-12-23 07:16:27
5334 2005-07-09 17:00:13.000 3852 3852 482 482 2005-07-11 15:50:13.000 1 1 2020-12-23 07:16:35
5466 2005-07-09 23:03:21.000 2302 2302 482 482 2005-07-10 20:11:21.000 2 2 2020-12-23 07:16:37
5810 2005-07-10 15:22:04.000 1426 1426 482 482 2005-07-18 21:05:04.000 2 2 2020-12-23 07:16:42
5880 2005-07-10 19:14:58.000 359 359 482 482 2005-07-17 01:13:58.000 1 1 2020-12-23 07:16:44
6355 2005-07-11 20:56:29.000 2472 2472 482 482 2005-07-20 01:50:29.000 2 2 2020-12-23 07:16:50
6447 2005-07-12 00:45:17.000 3945 3945 482 482 2005-07-18 05:56:17.000 2 2 2020-12-23 07:16:51
6844 2005-07-12 19:14:53.000 3211 3211 482 482 2005-07-18 16:07:53.000 2 2 2020-12-23 07:16:57
7840 2005-07-28 09:03:02.000 2899 2899 482 482 2005-08-06 06:15:02.000 1 1 2020-12-23 07:17:12
8584 2005-07-29 12:07:53.000 1656 1656 482 482 2005-07-31 09:27:53.000 1 1 2020-12-23 07:17:23
9874 2005-07-31 13:32:31.000 2476 2476 482 482 2005-08-07 09:50:31.000 2 2 2020-12-23 07:17:42
10824 2005-08-01 23:00:22.000 3948 3948 482 482 2005-08-04 04:14:22.000 2 2 2020-12-23 07:17:55
10839 2005-08-01 23:37:39.000 2867 2867 482 482 2005-08-02 20:18:39.000 1 1 2020-12-23 07:17:56
11498 2005-08-16 22:52:54.000 487 487 482 482 2005-08-25 03:27:54.000 2 2 2020-12-23 07:18:05
13174 2005-08-19 13:52:50.000 2303 2303 482 482 2005-08-22 14:43:50.000 2 2 2020-12-23 07:18:28
14383 2005-08-21 10:02:05.000 1941 1941 482 482 2005-08-24 12:21:05.000 2 2 2020-12-23 07:18:46
14732 2005-08-21 22:22:29.000 1915 1915 482 482 2005-08-23 18:34:29.000 1 1 2020-12-23 07:18:51
14891 2005-08-22 04:11:02.000 288 288 482 482 2005-08-27 03:22:02.000 1 1 2020-12-23 07:18:53
14995 2005-08-22 07:52:31.000 4178 4178 482 482 2005-08-24 05:16:31.000 1 1 2020-12-23 07:18:55
15391 2005-08-22 23:01:45.000 3918 3918 482 482 2005-08-29 02:59:45.000 2 2 2020-12-23 07:19:01
15849 2005-08-23 15:41:20.000 4077 4077 482 482 2005-08-27 15:47:20.000 2 2 2020-12-23 07:19:07
15865 2005-08-23 16:18:25.000 2031 2031 482 482 2005-08-26 10:57:25.000 2 2 2020-12-23 07:19:07
15879 2005-08-23 16:42:53.000 235 235 482 482 2005-08-29 16:21:53.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 10.175ms