home / sakila

rental

24 rows where customer_id = 175

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
1495 2005-06-15 21:54:31.000 1842 1842 175 175 2005-06-19 00:08:31.000 2 2 2020-12-23 07:15:40
3266 2005-06-21 04:49:07.000 2533 2533 175 175 2005-06-26 05:19:07.000 2 2 2020-12-23 07:16:04
3625 2005-07-06 06:12:52.000 1133 1133 175 175 2005-07-12 07:37:52.000 1 1 2020-12-23 07:16:10
4167 2005-07-07 09:37:08.000 3771 3771 175 175 2005-07-16 06:16:08.000 2 2 2020-12-23 07:16:18
5232 2005-07-09 12:35:08.000 3353 3353 175 175 2005-07-14 14:55:08.000 1 1 2020-12-23 07:16:34
6865 2005-07-12 20:02:40.000 1428 1428 175 175 2005-07-20 00:39:40.000 2 2 2020-12-23 07:16:58
7448 2005-07-27 18:06:30.000 3584 3584 175 175 2005-07-29 15:43:30.000 1 1 2020-12-23 07:17:06
7771 2005-07-28 06:52:12.000 1003 1003 175 175 2005-07-30 12:48:12.000 1 1 2020-12-23 07:17:11
8244 2005-07-29 00:35:34.000 1552 1552 175 175 2005-08-05 04:18:34.000 2 2 2020-12-23 07:17:18
8264 2005-07-29 01:18:50.000 2987 2987 175 175 2005-08-03 05:31:50.000 2 2 2020-12-23 07:17:18
8440 2005-07-29 07:31:26.000 489 489 175 175 2005-08-04 07:04:26.000 1 1 2020-12-23 07:17:21
8817 2005-07-29 22:09:08.000 2716 2716 175 175 2005-08-01 19:07:08.000 1 1 2020-12-23 07:17:27
9941 2005-07-31 15:31:25.000 1756 1756 175 175 2005-08-05 17:23:25.000 1 1 2020-12-23 07:17:43
10229 2005-08-01 01:45:26.000 3459 3459 175 175 2005-08-10 06:21:26.000 1 1 2020-12-23 07:17:47
10875 2005-08-02 00:31:44.000 862 862 175 175 2005-08-05 22:24:44.000 2 2 2020-12-23 07:17:56
11618 2005-08-17 04:01:36.000 954 954 175 175 2005-08-23 01:02:36.000 1 1 2020-12-23 07:18:06
12509 2005-08-18 13:21:52.000 2462 2462 175 175 2005-08-20 12:14:52.000 2 2 2020-12-23 07:18:18
13016 2005-08-19 07:57:14.000 3095 3095 175 175 2005-08-23 03:29:14.000 1 1 2020-12-23 07:18:25
13161 2006-02-14 15:16:03.000 986 986 175 175   1 1 2020-12-23 07:18:28
13833 2005-08-20 14:00:29.000 792 792 175 175 2005-08-29 12:01:29.000 2 2 2020-12-23 07:18:38
13997 2005-08-20 19:51:28.000 2330 2330 175 175 2005-08-26 01:29:28.000 2 2 2020-12-23 07:18:41
14060 2006-02-14 15:16:03.000 3100 3100 175 175   2 2 2020-12-23 07:18:42
14507 2005-08-21 14:32:45.000 1969 1969 175 175 2005-08-28 09:50:45.000 2 2 2020-12-23 07:18:48
14897 2005-08-22 04:22:31.000 1607 1607 175 175 2005-08-26 00:09:31.000 1 1 2020-12-23 07:18:53

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