home / sakila

rental

28 rows where customer_id = 284

✎ 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
423 2005-05-27 15:32:57.000 1783 1783 284 284 2005-06-02 19:03:57.000 1 1 2020-12-23 07:15:25
791 2005-05-29 16:30:42.000 1554 1554 284 284 2005-06-01 19:11:42.000 1 1 2020-12-23 07:15:30
1145 2005-05-31 20:13:45.000 1133 1133 284 284 2005-06-08 02:10:45.000 1 1 2020-12-23 07:15:35
1171 2005-06-14 23:50:11.000 4082 4082 284 284 2005-06-17 21:44:11.000 2 2 2020-12-23 07:15:35
2813 2005-06-19 20:01:47.000 3420 3420 284 284 2005-06-27 01:51:47.000 1 1 2020-12-23 07:15:58
3296 2005-06-21 07:04:53.000 2453 2453 284 284 2005-06-25 08:36:53.000 1 1 2020-12-23 07:16:05
3572 2005-07-06 03:33:23.000 1915 1915 284 284 2005-07-08 07:54:23.000 1 1 2020-12-23 07:16:09
4081 2005-07-07 05:10:08.000 1138 1138 284 284 2005-07-12 00:47:08.000 1 1 2020-12-23 07:16:17
4759 2005-07-08 14:39:22.000 3999 3999 284 284 2005-07-17 15:02:22.000 2 2 2020-12-23 07:16:27
4931 2005-07-08 22:16:18.000 2750 2750 284 284 2005-07-17 03:42:18.000 1 1 2020-12-23 07:16:30
5161 2005-07-09 08:57:56.000 2617 2617 284 284 2005-07-18 07:41:56.000 2 2 2020-12-23 07:16:33
6276 2005-07-11 16:15:50.000 1826 1826 284 284 2005-07-19 20:50:50.000 2 2 2020-12-23 07:16:49
6982 2005-07-27 00:53:41.000 3843 3843 284 284 2005-07-31 06:19:41.000 2 2 2020-12-23 07:16:59
7164 2005-07-27 07:36:34.000 527 527 284 284 2005-08-04 05:05:34.000 2 2 2020-12-23 07:17:02
7463 2005-07-27 18:48:32.000 3676 3676 284 284 2005-07-29 23:54:32.000 2 2 2020-12-23 07:17:07
7716 2005-07-28 04:33:15.000 1493 1493 284 284 2005-08-04 00:08:15.000 2 2 2020-12-23 07:17:10
8888 2005-07-30 00:39:36.000 2824 2824 284 284 2005-08-01 02:28:36.000 2 2 2020-12-23 07:17:27
9790 2005-07-31 10:34:08.000 3643 3643 284 284 2005-08-04 11:19:08.000 2 2 2020-12-23 07:17:41
10396 2005-08-01 07:08:46.000 2982 2982 284 284 2005-08-08 03:47:46.000 1 1 2020-12-23 07:17:49
10535 2005-08-01 12:21:13.000 1838 1838 284 284 2005-08-09 08:58:13.000 1 1 2020-12-23 07:17:51
12064 2006-02-14 15:16:03.000 298 298 284 284   1 1 2020-12-23 07:18:12
12162 2005-08-18 00:44:30.000 2697 2697 284 284 2005-08-25 03:34:30.000 1 1 2020-12-23 07:18:14
12959 2006-02-14 15:16:03.000 1540 1540 284 284   2 2 2020-12-23 07:18:25
14007 2005-08-20 20:22:47.000 374 374 284 284 2005-08-28 20:40:47.000 2 2 2020-12-23 07:18:41
14648 2005-08-21 19:18:01.000 2250 2250 284 284 2005-08-25 14:59:01.000 2 2 2020-12-23 07:18:50
14746 2005-08-21 22:54:02.000 3197 3197 284 284 2005-08-27 17:04:02.000 2 2 2020-12-23 07:18:51
14921 2005-08-22 05:12:24.000 3724 3724 284 284 2005-08-26 08:20:24.000 2 2 2020-12-23 07:18:53
15135 2005-08-22 13:19:19.000 555 555 284 284 2005-08-27 17:09:19.000 2 2 2020-12-23 07:18:57

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