home / sakila

rental

31 rows where customer_id = 157

✎ 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
352 2005-05-27 05:48:19.000 4369 4369 157 157 2005-05-29 09:05:19.000 1 1 2020-12-23 07:15:24
642 2005-05-28 18:49:12.000 140 140 157 157 2005-06-01 20:50:12.000 2 2 2020-12-23 07:15:28
2340 2005-06-18 11:30:56.000 1913 1913 157 157 2005-06-23 06:00:56.000 1 1 2020-12-23 07:15:52
3739 2005-07-06 11:54:18.000 4333 4333 157 157 2005-07-09 10:48:18.000 1 1 2020-12-23 07:16:11
4253 2005-07-07 14:13:13.000 3355 3355 157 157 2005-07-16 18:55:13.000 2 2 2020-12-23 07:16:19
4435 2005-07-07 22:51:04.000 3815 3815 157 157 2005-07-14 23:15:04.000 2 2 2020-12-23 07:16:22
4919 2005-07-08 21:41:54.000 2106 2106 157 157 2005-07-11 23:14:54.000 1 1 2020-12-23 07:16:29
5862 2005-07-10 18:20:48.000 2075 2075 157 157 2005-07-17 00:09:48.000 1 1 2020-12-23 07:16:43
7110 2005-07-27 05:30:48.000 3289 3289 157 157 2005-07-28 01:43:48.000 1 1 2020-12-23 07:17:01
7195 2005-07-27 08:47:01.000 721 721 157 157 2005-07-30 08:40:01.000 2 2 2020-12-23 07:17:03
7499 2005-07-27 20:10:28.000 3503 3503 157 157 2005-07-30 16:24:28.000 1 1 2020-12-23 07:17:07
8163 2005-07-28 21:11:48.000 1919 1919 157 157 2005-07-31 18:30:48.000 1 1 2020-12-23 07:17:17
8337 2005-07-29 04:31:55.000 752 752 157 157 2005-08-02 02:38:55.000 2 2 2020-12-23 07:17:19
8347 2005-07-29 04:49:25.000 4407 4407 157 157 2005-07-31 00:57:25.000 2 2 2020-12-23 07:17:20
8576 2005-07-29 11:55:01.000 3552 3552 157 157 2005-08-03 08:41:01.000 2 2 2020-12-23 07:17:23
8707 2005-07-29 17:21:58.000 2525 2525 157 157 2005-08-02 14:47:58.000 2 2 2020-12-23 07:17:25
8827 2005-07-29 22:31:24.000 1517 1517 157 157 2005-08-06 21:05:24.000 2 2 2020-12-23 07:17:27
9237 2005-07-30 13:48:17.000 2777 2777 157 157 2005-07-31 13:57:17.000 2 2 2020-12-23 07:17:33
9264 2005-07-30 14:51:36.000 4071 4071 157 157 2005-08-02 10:06:36.000 1 1 2020-12-23 07:17:33
9958 2005-07-31 16:03:56.000 4142 4142 157 157 2005-08-04 15:21:56.000 2 2 2020-12-23 07:17:43
10203 2005-08-01 00:45:27.000 1096 1096 157 157 2005-08-04 22:45:27.000 2 2 2020-12-23 07:17:46
11249 2005-08-02 13:35:40.000 3394 3394 157 157 2005-08-07 11:22:40.000 1 1 2020-12-23 07:18:01
11335 2005-08-02 16:57:37.000 2968 2968 157 157 2005-08-09 19:43:37.000 1 1 2020-12-23 07:18:02
12213 2005-08-18 02:33:55.000 4058 4058 157 157 2005-08-24 03:14:55.000 1 1 2020-12-23 07:18:14
12464 2005-08-18 11:33:34.000 1954 1954 157 157 2005-08-27 14:33:34.000 1 1 2020-12-23 07:18:18
12916 2005-08-19 04:27:05.000 2277 2277 157 157 2005-08-21 02:33:05.000 2 2 2020-12-23 07:18:24
13097 2005-08-19 10:50:43.000 4194 4194 157 157 2005-08-24 11:10:43.000 2 2 2020-12-23 07:18:27
13214 2005-08-19 15:31:06.000 2675 2675 157 157 2005-08-20 19:58:06.000 2 2 2020-12-23 07:18:28
13481 2005-08-20 01:11:12.000 2678 2678 157 157 2005-08-26 23:07:12.000 2 2 2020-12-23 07:18:32
13728 2005-08-20 10:11:07.000 1962 1962 157 157 2005-08-23 10:32:07.000 1 1 2020-12-23 07:18:36
14974 2005-08-22 07:04:25.000 2596 2596 157 157 2005-08-27 12:39:25.000 1 1 2020-12-23 07:18:54

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