home / sakila

rental

32 rows where customer_id = 306

✎ 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
375 2005-05-27 08:49:21.000 1815 1815 306 306 2005-06-04 14:11:21.000 1 1 2020-12-23 07:15:25
672 2005-05-28 22:05:29.000 697 697 306 306 2005-06-06 02:10:29.000 2 2 2020-12-23 07:15:28
1172 2005-06-14 23:54:34.000 2685 2685 306 306 2005-06-16 02:26:34.000 1 1 2020-12-23 07:15:35
2836 2005-06-19 21:58:21.000 1453 1453 306 306 2005-06-27 00:41:21.000 2 2 2020-12-23 07:15:59
3814 2005-07-06 15:23:56.000 3826 3826 306 306 2005-07-13 20:51:56.000 2 2 2020-12-23 07:16:13
4484 2005-07-08 01:05:57.000 2867 2867 306 306 2005-07-16 00:41:57.000 2 2 2020-12-23 07:16:23
4596 2005-07-08 06:41:25.000 2280 2280 306 306 2005-07-14 01:36:25.000 1 1 2020-12-23 07:16:24
5581 2005-07-10 04:06:06.000 3450 3450 306 306 2005-07-15 08:31:06.000 2 2 2020-12-23 07:16:39
6868 2005-07-12 20:10:17.000 719 719 306 306 2005-07-15 22:34:17.000 2 2 2020-12-23 07:16:58
6953 2005-07-26 23:52:47.000 2910 2910 306 306 2005-07-30 23:07:47.000 1 1 2020-12-23 07:16:59
7225 2005-07-27 09:47:12.000 632 632 306 306 2005-08-03 13:19:12.000 2 2 2020-12-23 07:17:03
7232 2005-07-27 10:04:19.000 1147 1147 306 306 2005-07-28 09:43:19.000 2 2 2020-12-23 07:17:03
7701 2005-07-28 03:54:28.000 1604 1604 306 306 2005-08-01 08:39:28.000 2 2 2020-12-23 07:17:10
8620 2005-07-29 13:51:20.000 3718 3718 306 306 2005-08-02 13:05:20.000 1 1 2020-12-23 07:17:24
8702 2005-07-29 17:04:37.000 2215 2215 306 306 2005-08-05 15:30:37.000 2 2 2020-12-23 07:17:25
9242 2005-07-30 14:03:58.000 755 755 306 306 2005-08-02 18:09:58.000 2 2 2020-12-23 07:17:33
9395 2005-07-30 20:07:06.000 1298 1298 306 306 2005-08-08 21:21:06.000 1 1 2020-12-23 07:17:35
9774 2005-07-31 09:57:51.000 4174 4174 306 306 2005-08-02 09:08:51.000 2 2 2020-12-23 07:17:41
10202 2005-08-01 00:43:18.000 1099 1099 306 306 2005-08-08 23:26:18.000 1 1 2020-12-23 07:17:46
10893 2005-08-02 01:12:13.000 2529 2529 306 306 2005-08-11 05:53:13.000 2 2 2020-12-23 07:17:56
11142 2005-08-02 09:30:11.000 2954 2954 306 306 2005-08-05 06:52:11.000 1 1 2020-12-23 07:17:59
11440 2005-08-02 20:24:02.000 2727 2727 306 306 2005-08-07 16:42:02.000 2 2 2020-12-23 07:18:04
11674 2005-08-17 05:56:27.000 582 582 306 306 2005-08-24 08:50:27.000 2 2 2020-12-23 07:18:07
11776 2005-08-17 10:27:19.000 2400 2400 306 306 2005-08-20 14:02:19.000 2 2 2020-12-23 07:18:08
12225 2005-08-18 03:00:11.000 1876 1876 306 306 2005-08-24 05:01:11.000 1 1 2020-12-23 07:18:14
12989 2005-08-19 07:19:04.000 2929 2929 306 306 2005-08-21 10:58:04.000 1 1 2020-12-23 07:18:25
13686 2005-08-20 08:57:28.000 666 666 306 306 2005-08-24 07:21:28.000 2 2 2020-12-23 07:18:36
13725 2005-08-20 10:08:27.000 3861 3861 306 306 2005-08-28 06:52:27.000 2 2 2020-12-23 07:18:36
13873 2005-08-20 15:11:11.000 1683 1683 306 306 2005-08-22 20:13:11.000 2 2 2020-12-23 07:18:39
13996 2005-08-20 19:45:43.000 3341 3341 306 306 2005-08-22 16:47:43.000 2 2 2020-12-23 07:18:41
15457 2005-08-23 01:07:37.000 4539 4539 306 306 2005-08-26 19:46:37.000 1 1 2020-12-23 07:19:01
15868 2005-08-23 16:19:14.000 2186 2186 306 306 2005-08-29 16:14:14.000 2 2 2020-12-23 07:19:07

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