home / sakila

rental

33 rows where customer_id = 172

✎ 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
449 2005-05-27 19:13:15.000 2469 2469 172 172 2005-06-04 01:08:15.000 2 2 2020-12-23 07:15:25
685 2005-05-29 00:17:51.000 1385 1385 172 172 2005-06-05 05:32:51.000 2 2 2020-12-23 07:15:29
837 2005-05-30 00:02:08.000 977 977 172 172 2005-06-02 05:31:08.000 2 2 2020-12-23 07:15:31
1507 2005-06-15 22:25:26.000 2514 2514 172 172 2005-06-19 17:00:26.000 1 1 2020-12-23 07:15:40
2052 2005-06-17 15:14:43.000 1686 1686 172 172 2005-06-21 11:08:43.000 1 1 2020-12-23 07:15:48
3032 2005-06-20 11:58:30.000 3734 3734 172 172 2005-06-24 09:49:30.000 1 1 2020-12-23 07:16:01
4820 2005-07-08 17:25:23.000 2672 2672 172 172 2005-07-17 20:32:23.000 2 2 2020-12-23 07:16:28
4821 2005-07-08 17:28:08.000 1690 1690 172 172 2005-07-11 17:44:08.000 1 1 2020-12-23 07:16:28
4878 2005-07-08 19:33:49.000 4009 4009 172 172 2005-07-17 17:47:49.000 1 1 2020-12-23 07:16:29
6246 2005-07-11 14:57:51.000 2376 2376 172 172 2005-07-19 19:10:51.000 2 2 2020-12-23 07:16:48
6380 2005-07-11 21:55:40.000 3378 3378 172 172 2005-07-17 20:42:40.000 1 1 2020-12-23 07:16:50
6875 2005-07-12 20:23:05.000 3420 3420 172 172 2005-07-19 00:09:05.000 2 2 2020-12-23 07:16:58
7122 2005-07-27 06:03:18.000 1699 1699 172 172 2005-08-04 10:43:18.000 2 2 2020-12-23 07:17:02
7135 2005-07-27 06:34:32.000 2959 2959 172 172 2005-07-28 03:01:32.000 1 1 2020-12-23 07:17:02
7194 2005-07-27 08:39:58.000 254 254 172 172 2005-08-01 03:12:58.000 1 1 2020-12-23 07:17:03
7261 2005-07-27 11:15:01.000 942 942 172 172 2005-07-28 09:42:01.000 2 2 2020-12-23 07:17:04
7638 2005-07-28 01:13:26.000 1890 1890 172 172 2005-07-28 20:34:26.000 1 1 2020-12-23 07:17:09
8944 2005-07-30 03:11:44.000 3513 3513 172 172 2005-08-06 23:15:44.000 2 2 2020-12-23 07:17:28
9118 2005-07-30 09:24:18.000 4538 4538 172 172 2005-08-02 14:46:18.000 2 2 2020-12-23 07:17:31
9218 2005-07-30 13:14:35.000 119 119 172 172 2005-08-07 18:03:35.000 1 1 2020-12-23 07:17:32
10312 2005-08-01 04:29:06.000 4389 4389 172 172 2005-08-08 04:52:06.000 2 2 2020-12-23 07:17:48
10621 2005-08-01 15:10:26.000 1650 1650 172 172 2005-08-04 10:58:26.000 1 1 2020-12-23 07:17:53
11499 2005-08-16 22:54:12.000 3857 3857 172 172 2005-08-24 03:37:12.000 2 2 2020-12-23 07:18:05
12350 2005-08-18 07:29:46.000 1333 1333 172 172 2005-08-21 12:50:46.000 1 1 2020-12-23 07:18:16
12638 2005-08-18 18:11:39.000 2849 2849 172 172 2005-08-25 21:54:39.000 2 2 2020-12-23 07:18:20
13067 2005-08-19 09:51:17.000 3825 3825 172 172 2005-08-25 09:58:17.000 2 2 2020-12-23 07:18:26
13320 2005-08-19 19:35:33.000 4522 4522 172 172 2005-08-24 20:09:33.000 2 2 2020-12-23 07:18:30
13342 2005-08-19 20:21:36.000 3476 3476 172 172 2005-08-21 16:26:36.000 1 1 2020-12-23 07:18:30
13937 2005-08-20 17:22:51.000 1755 1755 172 172 2005-08-27 15:51:51.000 1 1 2020-12-23 07:18:40
14991 2005-08-22 07:50:44.000 708 708 172 172 2005-08-30 06:32:44.000 2 2 2020-12-23 07:18:55
15637 2005-08-23 07:53:38.000 445 445 172 172 2005-08-29 03:16:38.000 2 2 2020-12-23 07:19:04
15902 2005-08-23 17:28:03.000 4500 4500 172 172 2005-08-30 18:36:03.000 1 1 2020-12-23 07:19:08
16038 2005-08-23 22:14:31.000 2612 2612 172 172 2005-08-30 03:28:31.000 1 1 2020-12-23 07:19:10

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