home / sakila

rental

26 rows where customer_id = 377

✎ 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
2556 2005-06-19 03:07:32.000 125 125 377 377 2005-06-23 23:09:32.000 1 1 2020-12-23 07:15:55
3080 2005-06-20 15:22:32.000 118 118 377 377 2005-06-24 11:08:32.000 1 1 2020-12-23 07:16:02
3086 2005-06-20 15:42:40.000 4437 4437 377 377 2005-06-25 19:21:40.000 1 1 2020-12-23 07:16:02
3136 2005-06-20 19:39:08.000 3349 3349 377 377 2005-06-22 23:35:08.000 2 2 2020-12-23 07:16:03
3443 2005-06-21 20:19:00.000 1639 1639 377 377 2005-06-30 15:39:00.000 1 1 2020-12-23 07:16:07
3858 2005-07-06 17:17:57.000 829 829 377 377 2005-07-10 23:10:57.000 2 2 2020-12-23 07:16:13
4053 2005-07-07 03:39:22.000 2889 2889 377 377 2005-07-09 22:32:22.000 1 1 2020-12-23 07:16:16
4077 2005-07-07 04:53:40.000 2445 2445 377 377 2005-07-09 09:56:40.000 2 2 2020-12-23 07:16:17
4225 2005-07-07 12:24:37.000 1766 1766 377 377 2005-07-12 06:47:37.000 2 2 2020-12-23 07:16:19
6893 2005-07-12 21:20:11.000 2611 2611 377 377 2005-07-21 18:55:11.000 2 2 2020-12-23 07:16:58
7697 2005-07-28 03:43:45.000 3966 3966 377 377 2005-08-03 07:55:45.000 2 2 2020-12-23 07:17:10
8018 2005-07-28 15:36:48.000 4129 4129 377 377 2005-08-06 20:04:48.000 1 1 2020-12-23 07:17:15
8916 2005-07-30 01:42:21.000 3852 3852 377 377 2005-08-03 05:28:21.000 1 1 2020-12-23 07:17:28
9461 2005-07-30 22:29:13.000 1679 1679 377 377 2005-08-05 20:55:13.000 2 2 2020-12-23 07:17:36
9564 2005-07-31 02:31:37.000 383 383 377 377 2005-08-03 22:57:37.000 2 2 2020-12-23 07:17:37
10013 2005-07-31 18:08:21.000 2364 2364 377 377 2005-08-08 13:22:21.000 2 2 2020-12-23 07:17:44
10183 2005-08-01 00:08:01.000 4319 4319 377 377 2005-08-09 20:41:01.000 1 1 2020-12-23 07:17:46
10738 2005-08-01 19:39:08.000 544 544 377 377 2005-08-10 20:37:08.000 1 1 2020-12-23 07:17:54
10943 2005-08-02 03:17:29.000 1036 1036 377 377 2005-08-03 00:50:29.000 2 2 2020-12-23 07:17:57
12390 2005-08-18 08:51:42.000 3603 3603 377 377 2005-08-23 13:06:42.000 1 1 2020-12-23 07:18:17
12549 2005-08-18 14:38:07.000 1010 1010 377 377 2005-08-21 08:45:07.000 1 1 2020-12-23 07:18:19
13249 2005-08-19 16:47:41.000 3084 3084 377 377 2005-08-20 13:30:41.000 1 1 2020-12-23 07:18:29
13275 2005-08-19 17:53:38.000 710 710 377 377 2005-08-23 16:29:38.000 2 2 2020-12-23 07:18:29
15088 2005-08-22 11:28:26.000 4199 4199 377 377 2005-08-24 15:46:26.000 2 2 2020-12-23 07:18:56
15995 2005-08-23 20:29:56.000 1122 1122 377 377 2005-08-30 18:09:56.000 1 1 2020-12-23 07:19:09
15999 2005-08-23 20:44:10.000 2584 2584 377 377 2005-08-31 02:38:10.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 13.886ms