home / sakila

rental

24 rows where customer_id = 104

✎ 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
163 2005-05-26 02:26:23.000 2306 2306 104 104 2005-06-04 06:36:23.000 1 1 2020-12-23 07:15:22
808 2005-05-29 19:08:20.000 1928 1928 104 104 2005-06-06 20:32:20.000 2 2 2020-12-23 07:15:30
1287 2005-06-15 08:41:38.000 4204 4204 104 104 2005-06-22 14:02:38.000 1 1 2020-12-23 07:15:37
2107 2005-06-17 19:31:16.000 1270 1270 104 104 2005-06-18 23:33:16.000 1 1 2020-12-23 07:15:48
2928 2005-06-20 04:43:45.000 1265 1265 104 104 2005-06-21 06:58:45.000 2 2 2020-12-23 07:16:00
3273 2005-06-21 05:24:17.000 3538 3538 104 104 2005-06-23 01:21:17.000 2 2 2020-12-23 07:16:04
4012 2005-07-07 00:56:09.000 1400 1400 104 104 2005-07-10 21:49:09.000 1 1 2020-12-23 07:16:16
4438 2005-07-07 22:56:17.000 4371 4371 104 104 2005-07-16 17:28:17.000 1 1 2020-12-23 07:16:22
4520 2005-07-08 02:53:46.000 3505 3505 104 104 2005-07-08 22:27:46.000 2 2 2020-12-23 07:16:23
4529 2005-07-08 03:26:20.000 1361 1361 104 104 2005-07-16 05:04:20.000 1 1 2020-12-23 07:16:23
4917 2005-07-08 21:32:30.000 3231 3231 104 104 2005-07-09 15:34:30.000 1 1 2020-12-23 07:16:29
5376 2005-07-09 18:54:08.000 1730 1730 104 104 2005-07-17 22:01:08.000 1 1 2020-12-23 07:16:36
7107 2005-07-27 05:22:04.000 1883 1883 104 104 2005-08-02 06:38:04.000 1 1 2020-12-23 07:17:01
8413 2005-07-29 06:47:39.000 2762 2762 104 104 2005-08-02 09:15:39.000 2 2 2020-12-23 07:17:21
9090 2005-07-30 08:24:42.000 3426 3426 104 104 2005-08-08 06:17:42.000 2 2 2020-12-23 07:17:30
9996 2005-07-31 17:32:03.000 3271 3271 104 104 2005-08-06 16:17:03.000 2 2 2020-12-23 07:17:44
11700 2005-08-17 07:12:31.000 2365 2365 104 104 2005-08-18 04:21:31.000 2 2 2020-12-23 07:18:07
12453 2005-08-18 11:17:07.000 2487 2487 104 104 2005-08-25 12:34:07.000 1 1 2020-12-23 07:18:17
13005 2005-08-19 07:45:42.000 3417 3417 104 104 2005-08-20 12:45:42.000 2 2 2020-12-23 07:18:25
13017 2005-08-19 08:02:24.000 2160 2160 104 104 2005-08-26 07:32:24.000 1 1 2020-12-23 07:18:25
13179 2005-08-19 13:59:53.000 1624 1624 104 104 2005-08-25 12:10:53.000 1 1 2020-12-23 07:18:28
13410 2005-08-19 22:41:44.000 1421 1421 104 104 2005-08-26 18:05:44.000 2 2 2020-12-23 07:18:31
14218 2005-08-21 04:43:59.000 4087 4087 104 104 2005-08-27 10:29:59.000 1 1 2020-12-23 07:18:44
15186 2005-08-22 15:52:57.000 1323 1323 104 104 2005-08-24 21:12:57.000 1 1 2020-12-23 07:18:57

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