home / sakila

rental

26 rows where customer_id = 312

✎ 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
229 2005-05-26 11:19:20.000 1131 1131 312 312 2005-05-31 11:56:20.000 2 2 2020-12-23 07:15:23
530 2005-05-28 05:13:01.000 3332 3332 312 312 2005-06-01 10:21:01.000 2 2 2020-12-23 07:15:26
1049 2005-05-31 06:57:04.000 3913 3913 312 312 2005-06-02 11:32:04.000 2 2 2020-12-23 07:15:34
1079 2005-05-31 10:48:17.000 268 268 312 312 2005-06-08 12:30:17.000 1 1 2020-12-23 07:15:34
1419 2005-06-15 17:54:50.000 1208 1208 312 312 2005-06-17 19:44:50.000 2 2 2020-12-23 07:15:39
3457 2005-06-21 21:42:33.000 883 883 312 312 2005-06-30 19:54:33.000 2 2 2020-12-23 07:16:07
3766 2005-07-06 13:04:35.000 4504 4504 312 312 2005-07-07 15:46:35.000 1 1 2020-12-23 07:16:12
3792 2005-07-06 14:26:38.000 2651 2651 312 312 2005-07-11 16:34:38.000 1 1 2020-12-23 07:16:12
4647 2005-07-08 09:27:36.000 674 674 312 312 2005-07-16 14:56:36.000 2 2 2020-12-23 07:16:25
5031 2005-07-09 02:36:37.000 4224 4224 312 312 2005-07-14 03:09:37.000 2 2 2020-12-23 07:16:31
6751 2005-07-12 14:50:34.000 1749 1749 312 312 2005-07-15 19:39:34.000 2 2 2020-12-23 07:16:56
6866 2005-07-12 20:03:44.000 2481 2481 312 312 2005-07-15 01:55:44.000 1 1 2020-12-23 07:16:58
8137 2005-07-28 20:07:18.000 3188 3188 312 312 2005-08-03 17:41:18.000 1 1 2020-12-23 07:17:16
8412 2005-07-29 06:44:50.000 743 743 312 312 2005-08-06 05:04:50.000 1 1 2020-12-23 07:17:21
8721 2005-07-29 17:56:21.000 2416 2416 312 312 2005-08-02 21:30:21.000 2 2 2020-12-23 07:17:25
9016 2005-07-30 05:26:13.000 4309 4309 312 312 2005-08-04 00:25:13.000 2 2 2020-12-23 07:17:29
9154 2005-07-30 10:59:54.000 576 576 312 312 2005-08-05 16:47:54.000 1 1 2020-12-23 07:17:31
10858 2005-08-02 00:08:39.000 852 852 312 312 2005-08-05 00:58:39.000 2 2 2020-12-23 07:17:56
11248 2005-08-02 13:35:34.000 4139 4139 312 312 2005-08-03 10:37:34.000 1 1 2020-12-23 07:18:01
11879 2005-08-17 14:25:09.000 2500 2500 312 312 2005-08-26 09:19:09.000 1 1 2020-12-23 07:18:10
12186 2005-08-18 01:43:36.000 1342 1342 312 312 2005-08-23 07:13:36.000 1 1 2020-12-23 07:18:14
12945 2005-08-19 05:51:46.000 3638 3638 312 312 2005-08-23 11:22:46.000 2 2 2020-12-23 07:18:24
14362 2005-08-21 09:19:49.000 1992 1992 312 312 2005-08-26 11:06:49.000 1 1 2020-12-23 07:18:46
14504 2005-08-21 14:23:01.000 4536 4536 312 312 2005-08-27 13:56:01.000 1 1 2020-12-23 07:18:48
15100 2005-08-22 11:55:03.000 4489 4489 312 312 2005-08-25 14:55:03.000 1 1 2020-12-23 07:18:56
15882 2005-08-23 16:44:31.000 2028 2028 312 312 2005-09-01 15:44:31.000 2 2 2020-12-23 07:19:08

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