home / sakila

rental

20 rows where customer_id = 449

✎ 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
263 2005-05-26 15:47:40.000 1160 1160 449 449 2005-05-30 10:07:40.000 2 2 2020-12-23 07:15:23
325 2005-05-27 01:09:55.000 2510 2510 449 449 2005-05-31 07:01:55.000 2 2 2020-12-23 07:15:24
849 2005-05-30 01:23:07.000 2424 2424 449 449 2005-06-07 01:50:07.000 1 1 2020-12-23 07:15:31
1295 2005-06-15 09:17:20.000 2897 2897 449 449 2005-06-18 10:14:20.000 2 2 2020-12-23 07:15:37
2348 2005-06-18 12:15:43.000 3622 3622 449 449 2005-06-24 14:03:43.000 2 2 2020-12-23 07:15:52
2970 2005-06-20 07:51:51.000 1167 1167 449 449 2005-06-28 10:14:51.000 2 2 2020-12-23 07:16:00
3503 2005-07-06 00:17:24.000 2944 2944 449 449 2005-07-08 03:47:24.000 1 1 2020-12-23 07:16:08
3977 2005-07-06 23:00:49.000 1284 1284 449 449 2005-07-15 00:41:49.000 1 1 2020-12-23 07:16:15
4433 2005-07-07 22:45:41.000 88 88 449 449 2005-07-16 23:30:41.000 2 2 2020-12-23 07:16:22
5824 2005-07-10 16:19:53.000 1980 1980 449 449 2005-07-12 11:17:53.000 2 2 2020-12-23 07:16:43
7755 2005-07-28 06:22:18.000 1247 1247 449 449 2005-08-06 11:38:18.000 2 2 2020-12-23 07:17:11
7803 2005-07-28 07:52:13.000 3438 3438 449 449 2005-08-03 13:35:13.000 1 1 2020-12-23 07:17:12
8002 2005-07-28 15:11:00.000 22 22 449 449 2005-07-31 15:46:00.000 2 2 2020-12-23 07:17:14
10083 2005-07-31 20:10:19.000 2585 2585 449 449 2005-08-06 23:18:19.000 1 1 2020-12-23 07:17:45
10409 2005-08-01 07:49:15.000 2804 2804 449 449 2005-08-02 13:42:15.000 2 2 2020-12-23 07:17:49
10416 2005-08-01 08:08:39.000 2629 2629 449 449 2005-08-10 09:26:39.000 2 2 2020-12-23 07:17:49
10516 2005-08-01 11:41:55.000 3924 3924 449 449 2005-08-08 17:16:55.000 1 1 2020-12-23 07:17:51
10688 2005-08-01 17:53:43.000 3161 3161 449 449 2005-08-09 21:50:43.000 1 1 2020-12-23 07:17:53
12212 2005-08-18 02:33:29.000 3898 3898 449 449 2005-08-25 07:10:29.000 2 2 2020-12-23 07:18:14
14962 2005-08-22 06:37:43.000 3104 3104 449 449 2005-08-29 03:44:43.000 2 2 2020-12-23 07:18:54

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