home / sakila

rental

27 rows where customer_id = 434

✎ 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
508 2005-05-28 02:40:50.000 4179 4179 434 434 2005-06-05 03:05:50.000 1 1 2020-12-23 07:15:26
1225 2005-06-15 03:45:35.000 1929 1929 434 434 2005-06-19 02:03:35.000 1 1 2020-12-23 07:15:36
1584 2005-06-16 04:50:50.000 3545 3545 434 434 2005-06-21 22:51:50.000 2 2 2020-12-23 07:15:41
2415 2005-06-18 17:02:42.000 3105 3105 434 434 2005-06-25 13:16:42.000 2 2 2020-12-23 07:15:53
2430 2005-06-18 17:51:46.000 1984 1984 434 434 2005-06-23 19:17:46.000 1 1 2020-12-23 07:15:53
2494 2005-06-18 22:15:09.000 1313 1313 434 434 2005-06-25 17:23:09.000 1 1 2020-12-23 07:15:54
3014 2005-06-20 10:45:20.000 2179 2179 434 434 2005-06-23 06:29:20.000 1 1 2020-12-23 07:16:01
3037 2005-06-20 12:28:03.000 2033 2033 434 434 2005-06-21 08:21:03.000 1 1 2020-12-23 07:16:01
4414 2005-07-07 22:00:21.000 991 991 434 434 2005-07-12 02:51:21.000 1 1 2020-12-23 07:16:22
4654 2005-07-08 09:48:03.000 4210 4210 434 434 2005-07-17 13:17:03.000 1 1 2020-12-23 07:16:25
4960 2005-07-08 23:27:16.000 2176 2176 434 434 2005-07-18 02:01:16.000 1 1 2020-12-23 07:16:30
5464 2005-07-09 22:58:14.000 3692 3692 434 434 2005-07-15 02:48:14.000 1 1 2020-12-23 07:16:37
6972 2005-07-27 00:31:25.000 1716 1716 434 434 2005-07-28 22:15:25.000 2 2 2020-12-23 07:16:59
7260 2005-07-27 11:09:28.000 3827 3827 434 434 2005-08-03 09:41:28.000 1 1 2020-12-23 07:17:04
7479 2005-07-27 19:18:17.000 218 218 434 434 2005-07-30 18:55:17.000 1 1 2020-12-23 07:17:07
8205 2005-07-28 23:18:48.000 2944 2944 434 434 2005-07-30 00:37:48.000 2 2 2020-12-23 07:17:17
9350 2005-07-30 18:24:30.000 798 798 434 434 2005-08-02 15:34:30.000 2 2 2020-12-23 07:17:34
11242 2005-08-02 13:32:00.000 1041 1041 434 434 2005-08-10 19:24:00.000 2 2 2020-12-23 07:18:01
11867 2005-08-17 14:04:28.000 938 938 434 434 2005-08-21 10:08:28.000 1 1 2020-12-23 07:18:10
12030 2005-08-17 20:10:48.000 449 449 434 434 2005-08-19 00:32:48.000 1 1 2020-12-23 07:18:12
12146 2005-08-18 00:10:04.000 3833 3833 434 434 2005-08-25 19:18:04.000 2 2 2020-12-23 07:18:13
12624 2005-08-18 17:35:00.000 1135 1135 434 434 2005-08-27 12:18:00.000 2 2 2020-12-23 07:18:20
13359 2005-08-19 21:04:49.000 4175 4175 434 434 2005-08-27 01:46:49.000 1 1 2020-12-23 07:18:31
13383 2005-08-19 21:38:44.000 3193 3193 434 434 2005-08-28 23:22:44.000 2 2 2020-12-23 07:18:31
14553 2005-08-21 15:59:40.000 3160 3160 434 434 2005-08-23 11:54:40.000 2 2 2020-12-23 07:18:48
15016 2005-08-22 08:47:35.000 879 879 434 434 2005-08-28 14:23:35.000 2 2 2020-12-23 07:18:55
15385 2005-08-22 22:37:34.000 140 140 434 434 2005-08-26 00:36:34.000 2 2 2020-12-23 07:19:01

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