home / sakila

rental

23 rows where customer_id = 184

✎ 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
196 2005-05-26 06:55:58.000 190 190 184 184 2005-05-27 10:54:58.000 1 1 2020-12-23 07:15:22
534 2005-05-28 06:15:25.000 992 992 184 184 2005-06-06 07:51:25.000 1 1 2020-12-23 07:15:27
567 2005-05-28 09:56:20.000 3308 3308 184 184 2005-06-01 06:41:20.000 2 2 2020-12-23 07:15:27
1976 2005-06-17 09:38:08.000 3631 3631 184 184 2005-06-23 07:23:08.000 2 2 2020-12-23 07:15:46
2312 2005-06-18 08:55:46.000 402 402 184 184 2005-06-24 04:34:46.000 2 2 2020-12-23 07:15:51
4314 2005-07-07 17:38:31.000 539 539 184 184 2005-07-09 20:24:31.000 1 1 2020-12-23 07:16:20
4882 2005-07-08 19:42:03.000 4540 4540 184 184 2005-07-16 22:24:03.000 1 1 2020-12-23 07:16:29
5891 2005-07-10 20:01:17.000 4355 4355 184 184 2005-07-12 00:15:17.000 1 1 2020-12-23 07:16:44
6493 2005-07-12 02:40:41.000 16 16 184 184 2005-07-16 04:56:41.000 1 1 2020-12-23 07:16:52
6700 2005-07-12 12:47:22.000 3063 3063 184 184 2005-07-21 16:04:22.000 1 1 2020-12-23 07:16:55
7051 2005-07-27 03:34:37.000 1310 1310 184 184 2005-07-31 03:48:37.000 2 2 2020-12-23 07:17:00
7686 2005-07-28 03:19:23.000 2144 2144 184 184 2005-08-04 05:17:23.000 2 2 2020-12-23 07:17:10
8892 2005-07-30 00:47:03.000 1584 1584 184 184 2005-08-06 03:23:03.000 2 2 2020-12-23 07:17:28
9162 2005-07-30 11:21:56.000 4198 4198 184 184 2005-08-02 15:32:56.000 1 1 2020-12-23 07:17:32
12166 2005-08-18 00:57:06.000 3627 3627 184 184 2005-08-26 03:13:06.000 2 2 2020-12-23 07:18:14
12454 2005-08-18 11:19:02.000 4219 4219 184 184 2005-08-19 12:00:02.000 2 2 2020-12-23 07:18:17
12532 2005-08-18 13:57:58.000 114 114 184 184 2005-08-24 14:58:58.000 2 2 2020-12-23 07:18:18
13134 2005-08-19 12:14:14.000 1354 1354 184 184 2005-08-20 11:52:14.000 1 1 2020-12-23 07:18:27
13262 2005-08-19 17:20:15.000 4483 4483 184 184 2005-08-26 18:28:15.000 2 2 2020-12-23 07:18:29
13303 2005-08-19 18:55:21.000 34 34 184 184 2005-08-23 18:49:21.000 2 2 2020-12-23 07:18:30
14472 2005-08-21 13:13:57.000 4097 4097 184 184 2005-08-23 14:04:57.000 2 2 2020-12-23 07:18:47
14801 2005-08-22 00:46:54.000 1677 1677 184 184 2005-08-30 19:03:54.000 1 1 2020-12-23 07:18:52
15611 2005-08-23 06:56:18.000 1713 1713 184 184 2005-08-25 06:10:18.000 1 1 2020-12-23 07:19:03

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