home / sakila

rental

23 rows where customer_id = 313

✎ 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
669 2005-05-28 22:03:25.000 3677 3677 313 313 2005-06-03 03:39:25.000 1 1 2020-12-23 07:15:28
712 2005-05-29 04:02:24.000 4191 4191 313 313 2005-05-30 03:09:24.000 2 2 2020-12-23 07:15:29
781 2005-05-29 14:23:58.000 88 88 313 313 2005-05-30 17:44:58.000 1 1 2020-12-23 07:15:30
843 2005-05-30 00:44:24.000 2214 2214 313 313 2005-05-31 00:58:24.000 2 2 2020-12-23 07:15:31
1312 2005-06-15 10:16:27.000 3608 3608 313 313 2005-06-20 06:53:27.000 1 1 2020-12-23 07:15:37
2617 2005-06-19 07:48:31.000 204 204 313 313 2005-06-27 11:56:31.000 1 1 2020-12-23 07:15:56
2711 2005-06-19 14:12:22.000 3944 3944 313 313 2005-06-21 09:29:22.000 1 1 2020-12-23 07:15:57
4552 2005-07-08 04:36:35.000 2549 2549 313 313 2005-07-14 05:48:35.000 2 2 2020-12-23 07:16:24
5255 2005-07-09 13:51:08.000 4418 4418 313 313 2005-07-17 13:58:08.000 2 2 2020-12-23 07:16:34
6384 2005-07-11 22:07:26.000 491 491 313 313 2005-07-16 22:39:26.000 1 1 2020-12-23 07:16:50
7294 2005-07-27 12:38:14.000 487 487 313 313 2005-07-30 13:01:14.000 1 1 2020-12-23 07:17:04
8381 2005-07-29 05:31:44.000 865 865 313 313 2005-07-31 09:20:44.000 1 1 2020-12-23 07:17:20
8970 2005-07-30 04:02:05.000 2940 2940 313 313 2005-08-07 03:40:05.000 2 2 2020-12-23 07:17:29
9836 2005-07-31 12:12:00.000 2870 2870 313 313 2005-08-09 06:53:00.000 1 1 2020-12-23 07:17:41
10237 2005-08-01 02:07:32.000 432 432 313 313 2005-08-07 03:54:32.000 1 1 2020-12-23 07:17:47
10933 2005-08-02 02:50:49.000 3970 3970 313 313 2005-08-08 04:39:49.000 1 1 2020-12-23 07:17:57
11854 2005-08-17 13:42:52.000 137 137 313 313 2005-08-26 14:04:52.000 1 1 2020-12-23 07:18:09
12011 2005-08-17 19:19:44.000 495 495 313 313 2005-08-23 00:56:44.000 2 2 2020-12-23 07:18:11
14250 2005-08-21 05:39:35.000 3008 3008 313 313 2005-08-28 10:06:35.000 2 2 2020-12-23 07:18:44
14325 2005-08-21 08:15:38.000 4432 4432 313 313 2005-08-23 08:08:38.000 2 2 2020-12-23 07:18:45
15081 2005-08-22 11:14:31.000 2501 2501 313 313 2005-08-28 14:23:31.000 2 2 2020-12-23 07:18:56
15340 2005-08-22 20:55:56.000 3653 3653 313 313 2005-08-27 18:52:56.000 1 1 2020-12-23 07:19:00
15569 2005-08-23 05:24:29.000 1071 1071 313 313 2005-08-30 08:23:29.000 2 2 2020-12-23 07:19:03

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