home / sakila

rental

33 rows where customer_id = 51

✎ 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
119 2005-05-25 19:37:02.000 1359 1359 51 51 2005-05-29 23:51:02.000 2 2 2020-12-23 07:15:21
661 2005-05-28 21:01:25.000 2247 2247 51 51 2005-06-02 01:22:25.000 2 2 2020-12-23 07:15:28
1028 2005-05-31 03:48:05.000 4479 4479 51 51 2005-06-01 03:51:05.000 1 1 2020-12-23 07:15:33
1373 2005-06-15 14:48:04.000 284 284 51 51 2005-06-22 09:48:04.000 1 1 2020-12-23 07:15:38
1477 2005-06-15 21:11:18.000 418 418 51 51 2005-06-19 02:05:18.000 1 1 2020-12-23 07:15:39
3525 2005-07-06 01:02:39.000 208 208 51 51 2005-07-14 02:27:39.000 1 1 2020-12-23 07:16:08
5230 2005-07-09 12:30:23.000 3707 3707 51 51 2005-07-13 08:41:23.000 1 1 2020-12-23 07:16:34
5304 2005-07-09 15:48:06.000 4411 4411 51 51 2005-07-14 19:29:06.000 1 1 2020-12-23 07:16:35
5473 2005-07-09 23:19:11.000 4283 4283 51 51 2005-07-19 02:30:11.000 2 2 2020-12-23 07:16:37
5606 2005-07-10 05:07:55.000 2896 2896 51 51 2005-07-15 00:14:55.000 2 2 2020-12-23 07:16:39
7207 2005-07-27 09:13:26.000 336 336 51 51 2005-08-01 10:24:26.000 1 1 2020-12-23 07:17:03
7398 2005-07-27 16:07:22.000 1572 1572 51 51 2005-08-05 16:16:22.000 1 1 2020-12-23 07:17:06
7636 2005-07-28 01:08:36.000 202 202 51 51 2005-08-03 21:36:36.000 1 1 2020-12-23 07:17:09
8495 2005-07-29 09:05:06.000 344 344 51 51 2005-08-06 05:48:06.000 2 2 2020-12-23 07:17:22
8693 2005-07-29 16:44:13.000 917 917 51 51 2005-08-01 15:56:13.000 1 1 2020-12-23 07:17:25
8880 2005-07-30 00:16:55.000 2920 2920 51 51 2005-08-01 01:05:55.000 1 1 2020-12-23 07:17:27
9649 2005-07-31 05:46:54.000 1588 1588 51 51 2005-08-04 08:42:54.000 2 2 2020-12-23 07:17:39
10244 2005-08-01 02:20:01.000 567 567 51 51 2005-08-06 23:06:01.000 2 2 2020-12-23 07:17:47
10780 2005-08-01 21:14:24.000 1450 1450 51 51 2005-08-07 16:32:24.000 2 2 2020-12-23 07:17:55
10894 2005-08-02 01:12:35.000 598 598 51 51 2005-08-09 22:55:35.000 1 1 2020-12-23 07:17:56
11302 2005-08-02 15:38:03.000 1918 1918 51 51 2005-08-09 10:33:03.000 2 2 2020-12-23 07:18:02
11685 2005-08-17 06:39:16.000 3552 3552 51 51 2005-08-22 04:20:16.000 2 2 2020-12-23 07:18:07
11751 2005-08-17 09:07:56.000 3309 3309 51 51 2005-08-26 13:16:56.000 1 1 2020-12-23 07:18:08
12184 2005-08-18 01:36:00.000 1723 1723 51 51 2005-08-21 01:59:00.000 1 1 2020-12-23 07:18:14
12725 2005-08-18 21:43:09.000 4071 4071 51 51 2005-08-23 18:50:09.000 1 1 2020-12-23 07:18:21
13098 2005-08-19 10:51:59.000 3770 3770 51 51 2005-08-24 11:27:59.000 1 1 2020-12-23 07:18:27
13302 2005-08-19 18:54:26.000 4041 4041 51 51 2005-08-21 23:01:26.000 1 1 2020-12-23 07:18:30
13868 2005-08-20 15:06:26.000 3173 3173 51 51 2005-08-22 19:08:26.000 2 2 2020-12-23 07:18:38
13882 2005-08-20 15:23:26.000 3245 3245 51 51 2005-08-22 13:03:26.000 1 1 2020-12-23 07:18:39
14221 2005-08-21 04:49:41.000 3824 3824 51 51 2005-08-29 23:52:41.000 1 1 2020-12-23 07:18:44
14512 2005-08-21 14:47:09.000 579 579 51 51 2005-08-24 18:10:09.000 2 2 2020-12-23 07:18:48
14617 2005-08-21 18:07:40.000 3562 3562 51 51 2005-08-24 23:48:40.000 2 2 2020-12-23 07:18:49
14903 2005-08-22 04:31:50.000 1795 1795 51 51 2005-08-25 22:53:50.000 2 2 2020-12-23 07:18:53

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