home / sakila

rental

25 rows where customer_id = 199

✎ 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
499 2005-05-28 01:05:07.000 2381 2381 199 199 2005-06-05 19:54:07.000 2 2 2020-12-23 07:15:26
1406 2005-06-15 16:44:00.000 3118 3118 199 199 2005-06-21 11:22:00.000 2 2 2020-12-23 07:15:38
1910 2005-06-17 05:11:27.000 3903 3903 199 199 2005-06-23 23:16:27.000 1 1 2020-12-23 07:15:45
3299 2005-06-21 07:23:34.000 3427 3427 199 199 2005-06-27 04:02:34.000 1 1 2020-12-23 07:16:05
4499 2005-07-08 02:08:48.000 851 851 199 199 2005-07-10 07:06:48.000 2 2 2020-12-23 07:16:23
4580 2005-07-08 06:04:23.000 3512 3512 199 199 2005-07-15 05:42:23.000 2 2 2020-12-23 07:16:24
4976 2005-07-09 00:03:30.000 617 617 199 199 2005-07-10 19:05:30.000 1 1 2020-12-23 07:16:30
5398 2005-07-09 19:44:58.000 4352 4352 199 199 2005-07-17 00:56:58.000 1 1 2020-12-23 07:16:36
5680 2005-07-10 08:47:36.000 3503 3503 199 199 2005-07-17 06:10:36.000 1 1 2020-12-23 07:16:40
6668 2005-07-12 11:37:45.000 1498 1498 199 199 2005-07-14 13:28:45.000 2 2 2020-12-23 07:16:55
6782 2005-07-12 16:23:25.000 2742 2742 199 199 2005-07-20 18:46:25.000 2 2 2020-12-23 07:16:56
7782 2005-07-28 07:13:40.000 3770 3770 199 199 2005-08-05 06:50:40.000 1 1 2020-12-23 07:17:11
8709 2005-07-29 17:25:54.000 902 902 199 199 2005-08-02 22:35:54.000 1 1 2020-12-23 07:17:25
9752 2005-07-31 09:22:02.000 249 249 199 199 2005-08-02 14:34:02.000 1 1 2020-12-23 07:17:40
9894 2005-07-31 14:07:44.000 3724 3724 199 199 2005-08-05 18:01:44.000 2 2 2020-12-23 07:17:42
9959 2005-07-31 16:04:22.000 340 340 199 199 2005-08-03 21:51:22.000 2 2 2020-12-23 07:17:43
10196 2005-08-01 00:34:51.000 3070 3070 199 199 2005-08-05 03:43:51.000 1 1 2020-12-23 07:17:46
10517 2005-08-01 11:41:57.000 2299 2299 199 199 2005-08-05 06:14:57.000 1 1 2020-12-23 07:17:51
10850 2005-08-01 23:53:45.000 1853 1853 199 199 2005-08-10 21:11:45.000 1 1 2020-12-23 07:17:56
11454 2005-08-02 21:04:39.000 2901 2901 199 199 2005-08-05 19:03:39.000 1 1 2020-12-23 07:18:04
12386 2005-08-18 08:45:57.000 3303 3303 199 199 2005-08-24 04:50:57.000 2 2 2020-12-23 07:18:16
13952 2006-02-14 15:16:03.000 224 224 199 199   2 2 2020-12-23 07:18:40
14320 2005-08-21 08:04:40.000 3121 3121 199 199 2005-08-22 02:09:40.000 1 1 2020-12-23 07:18:45
15412 2005-08-22 23:37:11.000 1267 1267 199 199 2005-08-28 23:26:11.000 2 2 2020-12-23 07:19:01
15751 2005-08-23 12:41:07.000 697 697 199 199 2005-08-29 07:03:07.000 2 2 2020-12-23 07:19:06

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