home / sakila

rental

29 rows where customer_id = 32

✎ 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
483 2005-05-27 23:00:25.000 1510 1510 32 32 2005-05-28 21:30:25.000 1 1 2020-12-23 07:15:26
803 2005-05-29 17:52:30.000 1602 1602 32 32 2005-05-30 14:35:30.000 2 2 2020-12-23 07:15:30
1067 2005-05-31 09:12:13.000 2345 2345 32 32 2005-06-01 06:15:13.000 1 1 2020-12-23 07:15:34
1887 2005-06-17 03:53:18.000 3591 3591 32 32 2005-06-25 07:37:18.000 2 2 2020-12-23 07:15:45
2160 2005-06-17 23:39:11.000 1644 1644 32 32 2005-06-22 20:04:11.000 1 1 2020-12-23 07:15:49
2624 2005-06-19 08:22:09.000 3071 3071 32 32 2005-06-27 11:13:09.000 1 1 2020-12-23 07:15:56
2891 2005-06-20 02:02:05.000 343 343 32 32 2005-06-25 02:45:05.000 1 1 2020-12-23 07:15:59
3500 2005-07-06 00:11:13.000 2447 2447 32 32 2005-07-13 19:01:13.000 2 2 2020-12-23 07:16:08
4434 2005-07-07 22:48:34.000 1801 1801 32 32 2005-07-09 18:55:34.000 1 1 2020-12-23 07:16:22
4771 2005-07-08 15:33:32.000 1060 1060 32 32 2005-07-10 12:38:32.000 1 1 2020-12-23 07:16:27
4899 2005-07-08 20:37:11.000 414 414 32 32 2005-07-10 21:53:11.000 1 1 2020-12-23 07:16:29
5307 2005-07-09 15:57:15.000 2847 2847 32 32 2005-07-17 13:42:15.000 2 2 2020-12-23 07:16:35
5767 2005-07-10 13:13:18.000 2871 2871 32 32 2005-07-17 14:41:18.000 2 2 2020-12-23 07:16:42
5954 2005-07-10 23:22:01.000 2627 2627 32 32 2005-07-14 04:42:01.000 2 2 2020-12-23 07:16:45
6122 2005-07-11 07:58:07.000 2212 2212 32 32 2005-07-16 09:52:07.000 1 1 2020-12-23 07:16:47
6450 2005-07-12 00:49:05.000 2413 2413 32 32 2005-07-13 01:54:05.000 2 2 2020-12-23 07:16:51
7084 2005-07-27 04:34:07.000 785 785 32 32 2005-08-05 00:21:07.000 2 2 2020-12-23 07:17:01
7589 2005-07-27 23:23:36.000 1569 1569 32 32 2005-08-04 00:16:36.000 1 1 2020-12-23 07:17:08
7793 2005-07-28 07:26:14.000 24 24 32 32 2005-08-03 07:45:14.000 1 1 2020-12-23 07:17:12
8390 2005-07-29 05:52:26.000 581 581 32 32 2005-08-04 08:12:26.000 2 2 2020-12-23 07:17:20
8453 2005-07-29 07:46:29.000 2907 2907 32 32 2005-07-30 07:07:29.000 1 1 2020-12-23 07:17:21
8914 2005-07-30 01:42:03.000 1347 1347 32 32 2005-08-04 03:53:03.000 1 1 2020-12-23 07:17:28
11135 2005-08-02 09:22:25.000 799 799 32 32 2005-08-04 14:30:25.000 2 2 2020-12-23 07:17:59
11831 2005-08-17 12:54:47.000 4562 4562 32 32 2005-08-21 11:21:47.000 1 1 2020-12-23 07:18:09
12414 2005-08-18 09:50:40.000 4454 4454 32 32 2005-08-26 06:45:40.000 2 2 2020-12-23 07:18:17
13736 2005-08-20 10:31:23.000 3369 3369 32 32 2005-08-28 06:51:23.000 1 1 2020-12-23 07:18:36
13931 2005-08-20 17:16:10.000 3884 3884 32 32 2005-08-27 12:03:10.000 2 2 2020-12-23 07:18:40
14075 2005-08-20 23:18:54.000 3793 3793 32 32 2005-08-26 21:59:54.000 2 2 2020-12-23 07:18:42
14570 2005-08-21 16:32:32.000 955 955 32 32 2005-08-30 12:03:32.000 2 2 2020-12-23 07:18:49

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