home / sakila

rental

27 rows where customer_id = 133

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
275 2005-05-26 17:09:53.000 1718 1718 133 133 2005-06-04 22:35:53.000 1 1 2020-12-23 07:15:23
447 2005-05-27 18:57:02.000 3890 3890 133 133 2005-06-05 18:38:02.000 1 1 2020-12-23 07:15:25
1522 2005-06-16 00:17:39.000 235 235 133 133 2005-06-22 05:38:39.000 1 1 2020-12-23 07:15:40
2665 2005-06-19 11:12:35.000 4531 4531 133 133 2005-06-26 11:55:35.000 2 2 2020-12-23 07:15:56
3006 2005-06-20 10:10:29.000 1677 1677 133 133 2005-06-22 07:26:29.000 2 2 2020-12-23 07:16:01
3365 2005-06-21 12:55:48.000 657 657 133 133 2005-06-23 13:38:48.000 2 2 2020-12-23 07:16:06
4506 2005-07-08 02:22:18.000 1484 1484 133 133 2005-07-13 04:54:18.000 2 2 2020-12-23 07:16:23
4566 2005-07-08 05:18:50.000 4302 4302 133 133 2005-07-15 01:53:50.000 1 1 2020-12-23 07:16:24
4681 2005-07-08 10:36:03.000 1025 1025 133 133 2005-07-16 09:21:03.000 2 2 2020-12-23 07:16:26
4829 2005-07-08 17:54:18.000 2661 2661 133 133 2005-07-11 23:41:18.000 1 1 2020-12-23 07:16:28
5063 2005-07-09 04:37:31.000 1027 1027 133 133 2005-07-13 09:56:31.000 2 2 2020-12-23 07:16:32
6157 2005-07-11 09:48:16.000 4481 4481 133 133 2005-07-16 05:00:16.000 2 2 2020-12-23 07:16:47
6609 2005-07-12 08:19:41.000 3332 3332 133 133 2005-07-19 08:19:41.000 2 2 2020-12-23 07:16:54
7177 2005-07-27 08:07:39.000 3818 3818 133 133 2005-07-30 03:17:39.000 2 2 2020-12-23 07:17:02
7400 2005-07-27 16:16:37.000 2874 2874 133 133 2005-07-31 12:34:37.000 2 2 2020-12-23 07:17:06
8389 2005-07-29 05:50:09.000 1241 1241 133 133 2005-08-06 05:15:09.000 2 2 2020-12-23 07:17:20
9139 2005-07-30 10:11:52.000 2809 2809 133 133 2005-08-03 12:44:52.000 1 1 2020-12-23 07:17:31
9175 2005-07-30 11:47:48.000 358 358 133 133 2005-08-02 08:13:48.000 1 1 2020-12-23 07:17:32
9671 2005-07-31 06:33:41.000 920 920 133 133 2005-08-02 07:50:41.000 1 1 2020-12-23 07:17:39
10665 2005-08-01 16:56:17.000 3594 3594 133 133 2005-08-03 18:58:17.000 1 1 2020-12-23 07:17:53
12419 2005-08-18 10:01:48.000 3111 3111 133 133 2005-08-19 13:40:48.000 1 1 2020-12-23 07:18:17
12834 2005-08-19 01:47:30.000 757 757 133 133 2005-08-24 20:08:30.000 1 1 2020-12-23 07:18:23
13323 2005-08-19 19:48:07.000 1055 1055 133 133 2005-08-23 15:28:07.000 1 1 2020-12-23 07:18:30
13455 2005-08-20 00:32:17.000 1315 1315 133 133 2005-08-26 19:33:17.000 1 1 2020-12-23 07:18:32
13910 2005-08-20 16:30:49.000 252 252 133 133 2005-08-24 13:30:49.000 2 2 2020-12-23 07:18:39
15080 2005-08-22 11:11:51.000 927 927 133 133 2005-08-23 13:09:51.000 1 1 2020-12-23 07:18:56
16009 2005-08-23 21:07:59.000 3055 3055 133 133 2005-08-29 16:54:59.000 2 2 2020-12-23 07:19:09

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