home / sakila

rental

32 rows where customer_id = 277

✎ 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
308 2005-05-26 22:01:39.000 187 187 277 277 2005-06-04 20:24:39.000 2 2 2020-12-23 07:15:24
1331 2005-06-15 11:34:33.000 3089 3089 277 277 2005-06-21 09:46:33.000 1 1 2020-12-23 07:15:37
1717 2005-06-16 14:47:16.000 3007 3007 277 277 2005-06-19 10:11:16.000 2 2 2020-12-23 07:15:43
2162 2005-06-17 23:45:47.000 1790 1790 277 277 2005-06-21 21:03:47.000 1 1 2020-12-23 07:15:49
2723 2005-06-19 14:55:23.000 4317 4317 277 277 2005-06-20 14:28:23.000 1 1 2020-12-23 07:15:57
3247 2005-06-21 03:12:15.000 1406 1406 277 277 2005-06-27 00:44:15.000 1 1 2020-12-23 07:16:04
3274 2005-06-21 05:30:36.000 2156 2156 277 277 2005-06-24 05:12:36.000 1 1 2020-12-23 07:16:04
3344 2005-06-21 10:57:27.000 4401 4401 277 277 2005-06-28 10:53:27.000 1 1 2020-12-23 07:16:06
3740 2005-07-06 11:55:35.000 1829 1829 277 277 2005-07-14 09:44:35.000 2 2 2020-12-23 07:16:11
3897 2005-07-06 19:11:43.000 14 14 277 277 2005-07-11 21:50:43.000 2 2 2020-12-23 07:16:14
4290 2005-07-07 15:47:10.000 4174 4174 277 277 2005-07-15 15:03:10.000 1 1 2020-12-23 07:16:20
4987 2005-07-09 00:45:41.000 996 996 277 277 2005-07-14 03:32:41.000 2 2 2020-12-23 07:16:30
5861 2005-07-10 18:14:22.000 3881 3881 277 277 2005-07-14 15:32:22.000 1 1 2020-12-23 07:16:43
5913 2005-07-10 20:58:55.000 2767 2767 277 277 2005-07-13 15:18:55.000 1 1 2020-12-23 07:16:44
6455 2005-07-12 01:01:58.000 4267 4267 277 277 2005-07-16 02:42:58.000 2 2 2020-12-23 07:16:51
6487 2005-07-12 02:17:00.000 4000 4000 277 277 2005-07-19 00:57:00.000 2 2 2020-12-23 07:16:52
7423 2005-07-27 17:11:47.000 666 666 277 277 2005-07-29 12:29:47.000 2 2 2020-12-23 07:17:06
8410 2005-07-29 06:41:36.000 3448 3448 277 277 2005-08-02 08:38:36.000 1 1 2020-12-23 07:17:21
9669 2005-07-31 06:31:36.000 4496 4496 277 277 2005-08-08 03:05:36.000 2 2 2020-12-23 07:17:39
9901 2005-07-31 14:20:59.000 3332 3332 277 277 2005-08-03 09:30:59.000 1 1 2020-12-23 07:17:42
11074 2005-08-02 07:21:43.000 1439 1439 277 277 2005-08-08 05:18:43.000 1 1 2020-12-23 07:17:59
11162 2005-08-02 10:07:54.000 1809 1809 277 277 2005-08-05 11:35:54.000 2 2 2020-12-23 07:18:00
11574 2005-08-17 01:38:19.000 3596 3596 277 277 2005-08-18 20:30:19.000 2 2 2020-12-23 07:18:06
12149 2005-08-18 00:13:51.000 3696 3696 277 277 2005-08-26 19:47:51.000 1 1 2020-12-23 07:18:13
12458 2005-08-18 11:22:53.000 4579 4579 277 277 2005-08-22 14:30:53.000 2 2 2020-12-23 07:18:17
13122 2005-08-19 11:53:49.000 3319 3319 277 277 2005-08-26 16:01:49.000 2 2 2020-12-23 07:18:27
13526 2005-08-20 02:58:42.000 1966 1966 277 277 2005-08-27 22:36:42.000 2 2 2020-12-23 07:18:33
13714 2005-08-20 09:41:09.000 2659 2659 277 277 2005-08-22 06:28:09.000 1 1 2020-12-23 07:18:36
14227 2005-08-21 04:56:31.000 4102 4102 277 277 2005-08-22 05:04:31.000 2 2 2020-12-23 07:18:44
14745 2005-08-21 22:53:01.000 4399 4399 277 277 2005-08-23 23:22:01.000 1 1 2020-12-23 07:18:51
15008 2005-08-22 08:24:32.000 961 961 277 277 2005-08-31 13:48:32.000 2 2 2020-12-23 07:18:55
15345 2005-08-22 21:05:50.000 3481 3481 277 277 2005-08-26 20:30:50.000 1 1 2020-12-23 07:19:00

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