home / sakila

rental

35 rows where customer_id = 21

✎ 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
260 2005-05-26 15:42:20.000 435 435 21 21 2005-05-31 13:21:20.000 2 2 2020-12-23 07:15:23
463 2005-05-27 20:11:47.000 826 826 21 21 2005-06-04 21:18:47.000 1 1 2020-12-23 07:15:26
570 2005-05-28 10:15:04.000 1122 1122 21 21 2005-05-30 08:32:04.000 1 1 2020-12-23 07:15:27
2235 2005-06-18 04:08:50.000 3463 3463 21 21 2005-06-27 07:58:50.000 1 1 2020-12-23 07:15:50
2268 2005-06-18 06:13:41.000 4380 4380 21 21 2005-06-22 08:53:41.000 2 2 2020-12-23 07:15:51
2393 2005-06-18 15:37:55.000 3143 3143 21 21 2005-06-25 17:11:55.000 1 1 2020-12-23 07:15:52
2830 2005-06-19 21:14:33.000 2080 2080 21 21 2005-06-21 17:46:33.000 1 1 2020-12-23 07:15:58
3212 2005-06-21 01:04:35.000 4178 4178 21 21 2005-06-30 00:10:35.000 2 2 2020-12-23 07:16:04
5107 2005-07-09 06:42:32.000 1697 1697 21 21 2005-07-10 08:21:32.000 2 2 2020-12-23 07:16:32
5772 2005-07-10 13:27:40.000 3635 3635 21 21 2005-07-17 08:24:40.000 1 1 2020-12-23 07:16:42
5961 2005-07-10 23:43:23.000 3537 3537 21 21 2005-07-15 05:21:23.000 2 2 2020-12-23 07:16:45
6943 2005-07-26 23:28:13.000 2436 2436 21 21 2005-07-30 02:22:13.000 2 2 2020-12-23 07:16:59
7994 2005-07-28 14:56:54.000 2431 2431 21 21 2005-07-30 09:56:54.000 2 2 2020-12-23 07:17:14
8196 2005-07-28 22:56:11.000 3435 3435 21 21 2005-08-06 04:53:11.000 1 1 2020-12-23 07:17:17
8862 2005-07-29 23:49:23.000 916 916 21 21 2005-08-04 20:11:23.000 1 1 2020-12-23 07:17:27
9149 2005-07-30 10:45:12.000 2632 2632 21 21 2005-08-01 09:40:12.000 1 1 2020-12-23 07:17:31
9699 2005-07-31 07:29:25.000 199 199 21 21 2005-08-06 01:35:25.000 1 1 2020-12-23 07:17:39
10570 2005-08-01 13:23:06.000 369 369 21 21 2005-08-05 15:30:06.000 2 2 2020-12-23 07:17:52
10734 2005-08-01 19:28:47.000 1130 1130 21 21 2005-08-03 00:41:47.000 2 2 2020-12-23 07:17:54
11072 2005-08-02 07:10:57.000 3078 3078 21 21 2005-08-04 07:42:57.000 1 1 2020-12-23 07:17:59
11970 2005-08-17 17:53:09.000 1779 1779 21 21 2005-08-24 14:41:09.000 1 1 2020-12-23 07:18:11
12131 2005-08-17 23:34:16.000 3380 3380 21 21 2005-08-26 01:18:16.000 1 1 2020-12-23 07:18:13
12660 2005-08-18 19:07:23.000 414 414 21 21 2005-08-27 17:20:23.000 2 2 2020-12-23 07:18:20
12774 2005-08-18 23:34:22.000 3601 3601 21 21 2005-08-28 05:00:22.000 2 2 2020-12-23 07:18:22
13381 2005-08-19 21:37:57.000 2823 2823 21 21 2005-08-21 18:07:57.000 2 2 2020-12-23 07:18:31
13399 2005-08-19 22:09:28.000 2309 2309 21 21 2005-08-25 20:25:28.000 2 2 2020-12-23 07:18:31
13411 2005-08-19 22:43:38.000 4425 4425 21 21 2005-08-26 18:29:38.000 2 2 2020-12-23 07:18:31
13463 2005-08-20 00:50:54.000 510 510 21 21 2005-08-28 23:00:54.000 1 1 2020-12-23 07:18:32
13699 2005-08-20 09:26:14.000 3913 3913 21 21 2005-08-29 08:16:14.000 2 2 2020-12-23 07:18:36
13740 2005-08-20 10:48:43.000 4366 4366 21 21 2005-08-29 15:30:43.000 1 1 2020-12-23 07:18:37
14077 2005-08-20 23:24:07.000 3184 3184 21 21 2005-08-29 02:53:07.000 1 1 2020-12-23 07:18:42
14161 2005-08-21 02:51:59.000 2744 2744 21 21 2005-08-28 21:38:59.000 2 2 2020-12-23 07:18:43
14446 2005-08-21 12:10:41.000 4367 4367 21 21 2005-08-26 14:42:41.000 1 1 2020-12-23 07:18:47
14869 2005-08-22 03:20:26.000 455 455 21 21 2005-08-23 05:25:26.000 2 2 2020-12-23 07:18:53
14933 2006-02-14 15:16:03.000 1186 1186 21 21   2 2 2020-12-23 07:18:54

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