home / sakila

rental

26 rows where customer_id = 423

✎ 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
1504 2005-06-15 22:08:06.000 3621 3621 423 423 2005-06-24 01:16:06.000 2 2 2020-12-23 07:15:40
1827 2005-06-16 21:54:40.000 3804 3804 423 423 2005-06-19 21:28:40.000 2 2 2020-12-23 07:15:44
2600 2005-06-19 06:07:25.000 469 469 423 423 2005-06-28 03:37:25.000 2 2 2020-12-23 07:15:55
2758 2005-06-19 17:04:35.000 3558 3558 423 423 2005-06-26 14:45:35.000 2 2 2020-12-23 07:15:58
3072 2005-06-20 14:21:31.000 4131 4131 423 423 2005-06-27 18:46:31.000 2 2 2020-12-23 07:16:02
4105 2005-07-07 06:31:00.000 439 439 423 423 2005-07-09 03:52:00.000 1 1 2020-12-23 07:16:17
4250 2005-07-07 14:08:11.000 2556 2556 423 423 2005-07-13 08:09:11.000 2 2 2020-12-23 07:16:19
4679 2005-07-08 10:33:14.000 3610 3610 423 423 2005-07-15 14:30:14.000 2 2 2020-12-23 07:16:26
6506 2005-07-12 03:28:22.000 386 386 423 423 2005-07-17 22:43:22.000 1 1 2020-12-23 07:16:52
7016 2005-07-27 02:15:16.000 1425 1425 423 423 2005-08-01 23:08:16.000 2 2 2020-12-23 07:17:00
7141 2005-07-27 06:55:27.000 3579 3579 423 423 2005-08-01 11:10:27.000 1 1 2020-12-23 07:17:02
7157 2005-07-27 07:20:28.000 1353 1353 423 423 2005-08-02 07:19:28.000 1 1 2020-12-23 07:17:02
7290 2005-07-27 12:28:45.000 3652 3652 423 423 2005-08-01 16:18:45.000 1 1 2020-12-23 07:17:04
7539 2005-07-27 21:39:42.000 1849 1849 423 423 2005-08-06 00:12:42.000 1 1 2020-12-23 07:17:08
7849 2005-07-28 09:30:02.000 996 996 423 423 2005-08-06 12:41:02.000 2 2 2020-12-23 07:17:12
8082 2005-07-28 18:08:02.000 3089 3089 423 423 2005-08-04 14:33:02.000 2 2 2020-12-23 07:17:16
8595 2005-07-29 12:47:43.000 3225 3225 423 423 2005-08-07 13:51:43.000 2 2 2020-12-23 07:17:23
9026 2005-07-30 05:55:31.000 1524 1524 423 423 2005-08-01 03:19:31.000 1 1 2020-12-23 07:17:30
10488 2005-08-01 10:27:27.000 297 297 423 423 2005-08-02 11:05:27.000 2 2 2020-12-23 07:17:51
11091 2005-08-02 07:56:41.000 1659 1659 423 423 2005-08-07 05:35:41.000 2 2 2020-12-23 07:17:59
11514 2005-08-16 23:53:10.000 4240 4240 423 423 2005-08-23 22:04:10.000 1 1 2020-12-23 07:18:05
12806 2005-08-19 00:37:26.000 4488 4488 423 423 2005-08-23 18:49:26.000 2 2 2020-12-23 07:18:22
14191 2005-08-21 03:35:58.000 301 301 423 423 2005-08-28 00:28:58.000 1 1 2020-12-23 07:18:44
14902 2005-08-22 04:31:50.000 866 866 423 423 2005-08-23 23:47:50.000 2 2 2020-12-23 07:18:53
15380 2005-08-22 22:28:15.000 3642 3642 423 423 2005-08-28 23:21:15.000 1 1 2020-12-23 07:19:00
15755 2005-08-23 12:46:38.000 511 511 423 423 2005-08-25 12:59:38.000 1 1 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 10.588ms