home / sakila

rental

28 rows where customer_id = 574

✎ 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
433 2005-05-27 16:40:40.000 4364 4364 574 574 2005-05-30 19:55:40.000 2 2 2020-12-23 07:15:25
1559 2005-06-16 02:35:03.000 716 716 574 574 2005-06-19 21:22:03.000 1 1 2020-12-23 07:15:40
1636 2005-06-16 08:28:54.000 2052 2052 574 574 2005-06-24 09:23:54.000 1 1 2020-12-23 07:15:41
1817 2005-06-16 21:20:52.000 1354 1354 574 574 2005-06-19 16:24:52.000 2 2 2020-12-23 07:15:44
2632 2005-06-19 08:51:47.000 2274 2274 574 574 2005-06-23 07:13:47.000 2 2 2020-12-23 07:15:56
3220 2005-06-21 01:46:25.000 1880 1880 574 574 2005-06-26 07:44:25.000 2 2 2020-12-23 07:16:04
3583 2005-07-06 04:10:43.000 204 204 574 574 2005-07-14 22:17:43.000 2 2 2020-12-23 07:16:09
4004 2005-07-07 00:20:51.000 667 667 574 574 2005-07-11 18:55:51.000 2 2 2020-12-23 07:16:15
4212 2005-07-07 11:53:14.000 1825 1825 574 574 2005-07-09 07:12:14.000 1 1 2020-12-23 07:16:19
4890 2005-07-08 20:05:38.000 3576 3576 574 574 2005-07-14 14:55:38.000 2 2 2020-12-23 07:16:29
5010 2005-07-09 01:33:23.000 1999 1999 574 574 2005-07-14 04:00:23.000 2 2 2020-12-23 07:16:31
5076 2005-07-09 05:13:22.000 4388 4388 574 574 2005-07-16 09:11:22.000 1 1 2020-12-23 07:16:32
5077 2005-07-09 05:18:01.000 686 686 574 574 2005-07-17 10:39:01.000 2 2 2020-12-23 07:16:32
5640 2005-07-10 06:38:00.000 2706 2706 574 574 2005-07-18 08:56:00.000 2 2 2020-12-23 07:16:40
6523 2005-07-12 04:14:19.000 1848 1848 574 574 2005-07-17 00:38:19.000 1 1 2020-12-23 07:16:52
7093 2005-07-27 04:47:00.000 3065 3065 574 574 2005-07-31 10:15:00.000 1 1 2020-12-23 07:17:01
7134 2005-07-27 06:33:06.000 1058 1058 574 574 2005-07-28 06:15:06.000 1 1 2020-12-23 07:17:02
7964 2005-07-28 13:49:58.000 2528 2528 574 574 2005-08-03 10:03:58.000 2 2 2020-12-23 07:17:14
8303 2005-07-29 03:05:56.000 1620 1620 574 574 2005-08-04 06:13:56.000 1 1 2020-12-23 07:17:19
9589 2005-07-31 03:13:29.000 2604 2604 574 574 2005-08-09 01:51:29.000 2 2 2020-12-23 07:17:38
9759 2005-07-31 09:25:57.000 2950 2950 574 574 2005-08-07 12:56:57.000 2 2 2020-12-23 07:17:40
10347 2005-08-01 05:20:03.000 953 953 574 574 2005-08-04 10:03:03.000 1 1 2020-12-23 07:17:48
11775 2005-08-17 10:25:53.000 256 256 574 574 2005-08-22 08:37:53.000 2 2 2020-12-23 07:18:08
12462 2005-08-18 11:28:55.000 890 890 574 574 2005-08-20 12:06:55.000 2 2 2020-12-23 07:18:17
13589 2005-08-20 05:47:25.000 3216 3216 574 574 2005-08-23 01:29:25.000 2 2 2020-12-23 07:18:34
14076 2005-08-20 23:20:10.000 1070 1070 574 574 2005-08-24 04:00:10.000 1 1 2020-12-23 07:18:42
14941 2005-08-22 05:58:23.000 2328 2328 574 574 2005-08-28 10:58:23.000 1 1 2020-12-23 07:18:54
15214 2005-08-22 16:53:29.000 1500 1500 574 574 2005-08-24 14:17:29.000 1 1 2020-12-23 07:18:58

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