home / sakila

rental

29 rows where customer_id = 253

✎ 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
566 2005-05-28 09:51:39.000 4330 4330 253 253 2005-06-05 09:35:39.000 1 1 2020-12-23 07:15:27
648 2005-05-28 19:25:54.000 3476 3476 253 253 2005-06-03 15:57:54.000 2 2 2020-12-23 07:15:28
986 2005-05-30 22:22:52.000 4045 4045 253 253 2005-06-01 02:24:52.000 1 1 2020-12-23 07:15:33
1378 2005-06-15 15:03:15.000 4372 4372 253 253 2005-06-19 16:50:15.000 1 1 2020-12-23 07:15:38
1606 2005-06-16 06:18:31.000 4290 4290 253 253 2005-06-25 09:15:31.000 1 1 2020-12-23 07:15:41
2081 2005-06-17 17:05:02.000 917 917 253 253 2005-06-26 20:26:02.000 1 1 2020-12-23 07:15:48
2142 2005-06-17 21:55:43.000 1787 1787 253 253 2005-06-26 19:41:43.000 2 2 2020-12-23 07:15:49
2454 2005-06-18 19:32:51.000 314 314 253 253 2005-06-24 20:03:51.000 2 2 2020-12-23 07:15:53
2636 2005-06-19 09:13:06.000 2102 2102 253 253 2005-06-25 07:47:06.000 2 2 2020-12-23 07:15:56
3658 2005-07-06 08:01:08.000 3453 3453 253 253 2005-07-15 06:36:08.000 1 1 2020-12-23 07:16:10
5505 2005-07-10 00:38:48.000 896 896 253 253 2005-07-12 03:12:48.000 2 2 2020-12-23 07:16:38
5602 2005-07-10 05:02:22.000 3544 3544 253 253 2005-07-14 23:40:22.000 2 2 2020-12-23 07:16:39
7689 2005-07-28 03:21:24.000 1803 1803 253 253 2005-07-31 08:01:24.000 2 2 2020-12-23 07:17:10
7851 2005-07-28 09:31:58.000 3596 3596 253 253 2005-08-04 09:58:58.000 2 2 2020-12-23 07:17:12
7887 2005-07-28 10:40:12.000 2820 2820 253 253 2005-08-02 06:09:12.000 1 1 2020-12-23 07:17:13
8752 2005-07-29 19:15:07.000 4202 4202 253 253 2005-07-31 13:27:07.000 1 1 2020-12-23 07:17:26
9606 2005-07-31 03:50:46.000 1357 1357 253 253 2005-08-01 05:29:46.000 2 2 2020-12-23 07:17:38
9618 2005-07-31 04:16:14.000 2688 2688 253 253 2005-08-07 02:43:14.000 2 2 2020-12-23 07:17:38
10404 2005-08-01 07:31:25.000 2580 2580 253 253 2005-08-07 09:23:25.000 1 1 2020-12-23 07:17:49
10660 2005-08-01 16:48:01.000 2518 2518 253 253 2005-08-07 14:42:01.000 2 2 2020-12-23 07:17:53
10881 2005-08-02 00:38:14.000 781 781 253 253 2005-08-09 22:02:14.000 2 2 2020-12-23 07:17:56
12572 2005-08-18 15:32:54.000 1366 1366 253 253 2005-08-21 10:30:54.000 1 1 2020-12-23 07:18:19
12827 2005-08-19 01:27:23.000 880 880 253 253 2005-08-27 02:22:23.000 2 2 2020-12-23 07:18:22
13126 2005-08-19 12:00:28.000 1392 1392 253 253 2005-08-28 17:27:28.000 1 1 2020-12-23 07:18:27
14086 2005-08-20 23:47:54.000 3244 3244 253 253 2005-08-27 22:49:54.000 1 1 2020-12-23 07:18:42
14283 2005-08-21 06:44:14.000 3052 3052 253 253 2005-08-24 01:01:14.000 1 1 2020-12-23 07:18:45
14640 2005-08-21 19:03:19.000 1880 1880 253 253 2005-08-27 00:37:19.000 2 2 2020-12-23 07:18:50
14655 2005-08-21 19:37:10.000 785 785 253 253 2005-08-22 15:43:10.000 1 1 2020-12-23 07:18:50
15221 2005-08-22 17:12:29.000 110 110 253 253 2005-08-24 20:46:29.000 2 2 2020-12-23 07:18:58

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