home / sakila

rental

24 rows where customer_id = 130

✎ 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
1 2005-05-24 22:53:30.000 367 367 130 130 2005-05-26 22:04:30.000 1 1 2020-12-23 07:15:20
746 2005-05-29 09:25:10.000 4272 4272 130 130 2005-06-02 04:20:10.000 2 2 2020-12-23 07:15:29
1630 2005-06-16 07:55:01.000 2413 2413 130 130 2005-06-19 06:38:01.000 1 1 2020-12-23 07:15:41
1864 2005-06-17 01:39:47.000 1815 1815 130 130 2005-06-24 19:39:47.000 2 2 2020-12-23 07:15:45
2163 2005-06-17 23:46:16.000 2600 2600 130 130 2005-06-22 22:48:16.000 2 2 2020-12-23 07:15:49
2292 2005-06-18 07:37:48.000 173 173 130 130 2005-06-20 02:45:48.000 2 2 2020-12-23 07:15:51
2535 2005-06-19 01:39:04.000 901 901 130 130 2005-06-28 01:33:04.000 2 2 2020-12-23 07:15:54
2982 2005-06-20 08:38:29.000 2574 2574 130 130 2005-06-28 13:21:29.000 1 1 2020-12-23 07:16:00
4339 2005-07-07 18:41:42.000 3215 3215 130 130 2005-07-08 13:00:42.000 1 1 2020-12-23 07:16:21
4485 2005-07-08 01:07:54.000 2614 2614 130 130 2005-07-16 03:19:54.000 2 2 2020-12-23 07:16:23
6353 2005-07-11 20:48:56.000 699 699 130 130 2005-07-21 00:11:56.000 1 1 2020-12-23 07:16:50
7181 2005-07-27 08:14:34.000 2788 2788 130 130 2005-07-28 03:09:34.000 1 1 2020-12-23 07:17:02
7728 2005-07-28 04:56:33.000 492 492 130 130 2005-07-31 07:54:33.000 1 1 2020-12-23 07:17:11
9452 2005-07-30 22:19:16.000 3178 3178 130 130 2005-08-04 19:26:16.000 1 1 2020-12-23 07:17:36
9637 2005-07-31 05:18:54.000 3013 3013 130 130 2005-08-03 01:23:54.000 2 2 2020-12-23 07:17:38
9724 2005-07-31 08:33:08.000 518 518 130 130 2005-08-08 04:50:08.000 1 1 2020-12-23 07:17:40
10568 2005-08-01 13:17:28.000 3009 3009 130 130 2005-08-08 17:04:28.000 1 1 2020-12-23 07:17:52
10645 2005-08-01 15:52:01.000 3864 3864 130 130 2005-08-09 18:58:01.000 1 1 2020-12-23 07:17:53
11811 2005-08-17 11:59:18.000 195 195 130 130 2005-08-18 09:13:18.000 2 2 2020-12-23 07:18:09
12094 2005-08-17 22:31:04.000 1050 1050 130 130 2005-08-23 22:45:04.000 1 1 2020-12-23 07:18:13
12777 2005-08-18 23:39:22.000 3467 3467 130 130 2005-08-27 20:28:22.000 1 1 2020-12-23 07:18:22
14111 2005-08-21 00:59:01.000 1294 1294 130 130 2005-08-22 20:43:01.000 2 2 2020-12-23 07:18:42
15574 2005-08-23 05:29:32.000 3253 3253 130 130 2005-09-01 01:25:32.000 2 2 2020-12-23 07:19:03
15777 2005-08-23 13:29:08.000 4241 4241 130 130 2005-08-27 18:50:08.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 16.521ms