home / sakila

rental

23 rows where customer_id = 530

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
851 2005-05-30 01:35:15.000 2780 2780 530 530 2005-06-06 07:27:15.000 1 1 2020-12-23 07:15:31
1273 2005-06-15 07:52:35.000 361 361 530 530 2005-06-21 04:55:35.000 1 1 2020-12-23 07:15:37
1516 2005-06-15 23:11:10.000 3702 3702 530 530 2005-06-17 20:37:10.000 1 1 2020-12-23 07:15:40
2158 2005-06-17 23:36:27.000 243 243 530 530 2005-06-19 19:25:27.000 2 2 2020-12-23 07:15:49
3669 2005-07-06 08:38:29.000 1299 1299 530 530 2005-07-10 05:28:29.000 1 1 2020-12-23 07:16:10
3887 2005-07-06 18:46:34.000 1695 1695 530 530 2005-07-07 13:15:34.000 1 1 2020-12-23 07:16:14
5663 2005-07-10 08:01:33.000 3078 3078 530 530 2005-07-15 03:36:33.000 2 2 2020-12-23 07:16:40
7031 2005-07-27 03:02:07.000 1435 1435 530 530 2005-08-02 07:14:07.000 1 1 2020-12-23 07:17:00
7075 2005-07-27 04:11:40.000 4414 4414 530 530 2005-08-03 08:16:40.000 2 2 2020-12-23 07:17:01
7218 2005-07-27 09:34:24.000 2458 2458 530 530 2005-08-01 07:00:24.000 1 1 2020-12-23 07:17:03
8208 2005-07-28 23:26:35.000 1362 1362 530 530 2005-08-01 23:00:35.000 2 2 2020-12-23 07:17:18
8736 2005-07-29 18:31:15.000 1726 1726 530 530 2005-07-30 16:24:15.000 2 2 2020-12-23 07:17:25
9914 2005-07-31 14:51:19.000 3147 3147 530 530 2005-08-05 09:51:19.000 1 1 2020-12-23 07:17:43
10211 2005-08-01 01:01:16.000 810 810 530 530 2005-08-10 01:31:16.000 1 1 2020-12-23 07:17:47
10504 2005-08-01 11:10:55.000 3345 3345 530 530 2005-08-10 10:16:55.000 1 1 2020-12-23 07:17:51
11326 2005-08-02 16:34:29.000 1762 1762 530 530 2005-08-03 17:40:29.000 2 2 2020-12-23 07:18:02
12220 2005-08-18 02:50:02.000 982 982 530 530 2005-08-22 00:20:02.000 1 1 2020-12-23 07:18:14
12387 2005-08-18 08:46:24.000 3604 3604 530 530 2005-08-21 02:56:24.000 2 2 2020-12-23 07:18:16
12649 2005-08-18 18:31:47.000 3201 3201 530 530 2005-08-22 21:07:47.000 2 2 2020-12-23 07:18:20
13561 2006-02-14 15:16:03.000 3202 3202 530 530   1 1 2020-12-23 07:18:34
13998 2005-08-20 19:52:38.000 3936 3936 530 530 2005-08-26 14:57:38.000 1 1 2020-12-23 07:18:41
14707 2005-08-21 21:06:29.000 2916 2916 530 530 2005-08-30 23:37:29.000 1 1 2020-12-23 07:18:50
15066 2005-08-22 10:49:06.000 2712 2712 530 530 2005-08-23 10:25:06.000 1 1 2020-12-23 07:18:56

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