home / sakila

rental

30 rows where customer_id = 424

✎ 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
403 2005-05-27 13:28:52.000 3983 3983 424 424 2005-05-29 11:47:52.000 2 2 2020-12-23 07:15:25
3044 2005-06-20 12:38:49.000 3216 3216 424 424 2005-06-25 07:49:49.000 1 1 2020-12-23 07:16:01
3166 2005-06-20 21:32:32.000 1850 1850 424 424 2005-06-27 20:29:32.000 1 1 2020-12-23 07:16:03
3404 2005-06-21 15:57:52.000 2005 2005 424 424 2005-06-24 20:58:52.000 2 2 2020-12-23 07:16:06
3746 2005-07-06 12:10:51.000 3387 3387 424 424 2005-07-07 11:36:51.000 2 2 2020-12-23 07:16:12
4512 2005-07-08 02:38:56.000 1569 1569 424 424 2005-07-10 20:46:56.000 1 1 2020-12-23 07:16:23
4559 2005-07-08 04:56:49.000 1911 1911 424 424 2005-07-12 08:56:49.000 2 2 2020-12-23 07:16:24
4696 2005-07-08 11:12:27.000 1358 1358 424 424 2005-07-14 05:41:27.000 1 1 2020-12-23 07:16:26
5568 2005-07-10 03:36:56.000 1130 1130 424 424 2005-07-11 08:35:56.000 2 2 2020-12-23 07:16:39
5611 2005-07-10 05:13:43.000 2832 2832 424 424 2005-07-16 05:56:43.000 1 1 2020-12-23 07:16:39
6589 2005-07-12 07:06:29.000 1595 1595 424 424 2005-07-14 12:06:29.000 2 2 2020-12-23 07:16:53
7594 2005-07-27 23:30:41.000 3230 3230 424 424 2005-08-02 04:29:41.000 1 1 2020-12-23 07:17:09
8194 2005-07-28 22:51:44.000 1148 1148 424 424 2005-07-29 17:13:44.000 1 1 2020-12-23 07:17:17
8918 2005-07-30 01:56:22.000 2544 2544 424 424 2005-08-04 01:58:22.000 2 2 2020-12-23 07:17:28
8964 2005-07-30 03:49:35.000 280 280 424 424 2005-08-06 23:28:35.000 2 2 2020-12-23 07:17:29
8999 2005-07-30 04:55:46.000 3458 3458 424 424 2005-08-01 00:16:46.000 2 2 2020-12-23 07:17:29
9471 2005-07-30 23:02:36.000 2390 2390 424 424 2005-08-04 17:49:36.000 1 1 2020-12-23 07:17:36
9516 2005-07-31 00:40:58.000 3519 3519 424 424 2005-08-07 02:13:58.000 2 2 2020-12-23 07:17:37
9878 2005-07-31 13:42:02.000 1753 1753 424 424 2005-08-05 10:15:02.000 2 2 2020-12-23 07:17:42
10017 2005-07-31 18:13:22.000 1495 1495 424 424 2005-08-05 16:03:22.000 1 1 2020-12-23 07:17:44
10369 2005-08-01 06:13:44.000 2534 2534 424 424 2005-08-07 09:46:44.000 1 1 2020-12-23 07:17:49
10866 2005-08-02 00:22:49.000 117 117 424 424 2005-08-07 04:38:49.000 1 1 2020-12-23 07:17:56
11374 2005-08-02 18:14:54.000 2805 2805 424 424 2005-08-04 18:22:54.000 1 1 2020-12-23 07:18:03
11562 2005-08-17 01:23:39.000 2992 2992 424 424 2005-08-26 06:16:39.000 1 1 2020-12-23 07:18:06
11833 2005-08-17 13:00:33.000 3728 3728 424 424 2005-08-18 13:45:33.000 2 2 2020-12-23 07:18:09
12729 2005-08-18 21:52:59.000 3711 3711 424 424 2005-08-21 00:02:59.000 1 1 2020-12-23 07:18:21
13793 2005-08-20 12:22:04.000 2598 2598 424 424 2005-08-27 09:51:04.000 2 2 2020-12-23 07:18:37
15094 2006-02-14 15:16:03.000 922 922 424 424   1 1 2020-12-23 07:18:56
15113 2005-08-22 12:23:59.000 4338 4338 424 424 2005-08-27 09:59:59.000 1 1 2020-12-23 07:18:56
15941 2005-08-23 18:46:44.000 4304 4304 424 424 2005-08-31 17:31:44.000 1 1 2020-12-23 07:19:08

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