home / sakila

rental

35 rows where customer_id = 204

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
251 2005-05-26 14:35:40.000 4352 4352 204 204 2005-05-29 17:17:40.000 1 1 2020-12-23 07:15:23
399 2005-05-27 12:48:38.000 553 553 204 204 2005-05-29 15:27:38.000 1 1 2020-12-23 07:15:25
857 2005-05-30 02:01:23.000 2569 2569 204 204 2005-06-02 06:07:23.000 2 2 2020-12-23 07:15:31
1016 2005-05-31 02:49:43.000 3423 3423 204 204 2005-06-04 03:48:43.000 1 1 2020-12-23 07:15:33
1321 2005-06-15 10:49:17.000 3516 3516 204 204 2005-06-16 15:30:17.000 1 1 2020-12-23 07:15:37
1616 2005-06-16 07:04:52.000 2296 2296 204 204 2005-06-24 04:06:52.000 1 1 2020-12-23 07:15:41
1871 2005-06-17 02:25:12.000 481 481 204 204 2005-06-23 03:16:12.000 2 2 2020-12-23 07:15:45
1894 2005-06-17 04:18:48.000 3707 3707 204 204 2005-06-26 00:07:48.000 1 1 2020-12-23 07:15:45
2186 2005-06-18 01:15:27.000 2050 2050 204 204 2005-06-21 06:16:27.000 1 1 2020-12-23 07:15:50
2734 2005-06-19 15:36:27.000 794 794 204 204 2005-06-20 13:44:27.000 2 2 2020-12-23 07:15:57
4043 2005-07-07 03:09:50.000 3427 3427 204 204 2005-07-10 07:49:50.000 2 2 2020-12-23 07:16:16
4979 2005-07-09 00:24:34.000 3447 3447 204 204 2005-07-12 20:04:34.000 1 1 2020-12-23 07:16:30
5145 2005-07-09 08:13:25.000 2397 2397 204 204 2005-07-10 03:56:25.000 2 2 2020-12-23 07:16:33
5619 2005-07-10 05:29:33.000 113 113 204 204 2005-07-15 00:40:33.000 1 1 2020-12-23 07:16:40
6004 2005-07-11 01:34:25.000 1756 1756 204 204 2005-07-18 00:48:25.000 2 2 2020-12-23 07:16:45
6225 2005-07-11 13:45:14.000 2483 2483 204 204 2005-07-14 10:23:14.000 1 1 2020-12-23 07:16:48
6631 2005-07-12 09:31:43.000 2340 2340 204 204 2005-07-15 05:00:43.000 2 2 2020-12-23 07:16:54
6694 2005-07-12 12:39:23.000 586 586 204 204 2005-07-19 14:47:23.000 1 1 2020-12-23 07:16:55
6871 2005-07-12 20:13:49.000 3612 3612 204 204 2005-07-14 20:11:49.000 2 2 2020-12-23 07:16:58
7392 2005-07-27 16:01:05.000 3159 3159 204 204 2005-08-01 17:23:05.000 2 2 2020-12-23 07:17:06
9005 2005-07-30 05:04:58.000 157 157 204 204 2005-08-03 07:41:58.000 2 2 2020-12-23 07:17:29
9394 2005-07-30 20:06:24.000 161 161 204 204 2005-08-06 22:36:24.000 1 1 2020-12-23 07:17:35
9906 2005-07-31 14:38:12.000 4241 4241 204 204 2005-08-01 13:56:12.000 1 1 2020-12-23 07:17:42
10042 2005-07-31 19:01:25.000 123 123 204 204 2005-08-06 14:21:25.000 1 1 2020-12-23 07:17:44
10399 2005-08-01 07:13:39.000 2515 2515 204 204 2005-08-10 06:56:39.000 1 1 2020-12-23 07:17:49
11261 2005-08-02 13:54:26.000 31 31 204 204 2005-08-10 19:04:26.000 2 2 2020-12-23 07:18:01
11886 2005-08-17 14:58:51.000 608 608 204 204 2005-08-19 16:07:51.000 2 2 2020-12-23 07:18:10
12737 2005-08-18 22:11:37.000 736 736 204 204 2005-08-26 04:08:37.000 1 1 2020-12-23 07:18:21
13084 2005-08-19 10:27:25.000 3792 3792 204 204 2005-08-26 07:32:25.000 2 2 2020-12-23 07:18:26
13416 2005-08-19 22:48:48.000 1075 1075 204 204 2005-08-21 22:09:48.000 2 2 2020-12-23 07:18:31
13899 2005-08-20 16:05:11.000 427 427 204 204 2005-08-23 15:14:11.000 2 2 2020-12-23 07:18:39
14163 2005-08-21 02:56:52.000 1007 1007 204 204 2005-08-21 21:03:52.000 2 2 2020-12-23 07:18:43
14871 2005-08-22 03:23:24.000 3411 3411 204 204 2005-08-23 22:23:24.000 2 2 2020-12-23 07:18:53
15364 2005-08-22 21:41:41.000 4184 4184 204 204 2005-08-28 00:49:41.000 1 1 2020-12-23 07:19:00
15415 2005-08-22 23:48:56.000 4176 4176 204 204 2005-09-01 02:05:56.000 1 1 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.863ms