home / sakila

rental

28 rows where customer_id = 376

✎ 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
554 2005-05-28 08:23:16.000 1951 1951 376 376 2005-05-31 03:29:16.000 2 2 2020-12-23 07:15:27
1208 2005-06-15 02:30:03.000 750 750 376 376 2005-06-18 00:04:03.000 1 1 2020-12-23 07:15:36
2779 2005-06-19 18:19:07.000 1020 1020 376 376 2005-06-23 18:25:07.000 2 2 2020-12-23 07:15:58
3719 2005-07-06 11:05:55.000 3573 3573 376 376 2005-07-11 08:10:55.000 2 2 2020-12-23 07:16:11
4163 2005-07-07 09:19:28.000 3176 3176 376 376 2005-07-10 06:47:28.000 2 2 2020-12-23 07:16:18
4166 2005-07-07 09:33:30.000 3267 3267 376 376 2005-07-16 06:06:30.000 1 1 2020-12-23 07:16:18
4320 2005-07-07 17:51:59.000 3437 3437 376 376 2005-07-13 18:39:59.000 1 1 2020-12-23 07:16:20
4554 2005-07-08 04:48:03.000 3878 3878 376 376 2005-07-16 04:34:03.000 1 1 2020-12-23 07:16:24
4869 2005-07-08 19:14:05.000 2860 2860 376 376 2005-07-15 22:27:05.000 1 1 2020-12-23 07:16:29
5675 2005-07-10 08:31:06.000 2134 2134 376 376 2005-07-17 11:48:06.000 1 1 2020-12-23 07:16:40
6524 2005-07-12 04:14:35.000 1467 1467 376 376 2005-07-17 03:59:35.000 2 2 2020-12-23 07:16:52
6545 2005-07-12 04:56:30.000 4447 4447 376 376 2005-07-20 05:41:30.000 1 1 2020-12-23 07:16:53
6807 2005-07-12 17:33:53.000 669 669 376 376 2005-07-18 16:28:53.000 2 2 2020-12-23 07:16:57
8269 2005-07-29 01:26:54.000 2778 2778 376 376 2005-08-04 22:42:54.000 1 1 2020-12-23 07:17:18
8420 2005-07-29 07:00:45.000 4184 4184 376 376 2005-08-06 02:20:45.000 1 1 2020-12-23 07:17:21
9773 2005-07-31 09:56:56.000 4555 4555 376 376 2005-08-04 09:38:56.000 1 1 2020-12-23 07:17:40
9828 2005-07-31 11:56:57.000 3845 3845 376 376 2005-08-02 17:05:57.000 1 1 2020-12-23 07:17:41
9872 2005-07-31 13:27:55.000 1021 1021 376 376 2005-08-04 14:33:55.000 1 1 2020-12-23 07:17:42
10413 2005-08-01 07:59:39.000 1018 1018 376 376 2005-08-08 03:55:39.000 1 1 2020-12-23 07:17:49
10810 2005-08-01 22:40:39.000 2314 2314 376 376 2005-08-06 19:47:39.000 1 1 2020-12-23 07:17:55
11144 2005-08-02 09:39:17.000 2724 2724 376 376 2005-08-03 11:53:17.000 2 2 2020-12-23 07:18:00
11792 2005-08-17 11:03:53.000 3703 3703 376 376 2005-08-26 06:34:53.000 1 1 2020-12-23 07:18:08
11851 2005-08-17 13:30:27.000 3225 3225 376 376 2005-08-20 15:34:27.000 2 2 2020-12-23 07:18:09
13009 2005-08-19 07:50:35.000 677 677 376 376 2005-08-21 06:04:35.000 1 1 2020-12-23 07:18:25
13141 2005-08-19 12:41:41.000 4545 4545 376 376 2005-08-21 08:17:41.000 2 2 2020-12-23 07:18:27
13761 2005-08-20 11:28:50.000 3149 3149 376 376 2005-08-21 12:05:50.000 2 2 2020-12-23 07:18:37
15107 2005-08-22 12:05:02.000 2378 2378 376 376 2005-08-23 11:09:02.000 1 1 2020-12-23 07:18:56
15382 2005-08-22 22:30:50.000 333 333 376 376 2005-08-24 04:07:50.000 2 2 2020-12-23 07:19:01

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