I'm trying to insert stock data from multiple company stock tables into one portfolio table. I have 4 insert into statements, and they all run without error, but only the data from the first statement is actually inserted.

I also need to insert the associated date with each stock entry. Each company's table has it's own date column. How do I insert the date that each stock entry is associated with, assuming that some stocks have an earlier start date than others(and thus some stock's entries will be null for a certain date) and also join one or more entries that have the same date.

I've commented out the first insert statement, which results in the second statements data showing up, but again, no data from the subsequent statements.

```
INSERT INTO portfolio (date, GOOG_adjusted_close) 
SELECT date, GOOG.close
FROM GOOG
ORDER BY date ASC;

INSERT INTO portfolio (date, CELG_adjusted_close) 
SELECT date, CELG.close
FROM CELG
ORDER BY date ASC;

INSERT INTO portfolio (date, NVDA_adjusted_close) 
SELECT date, NVDA.close
FROM NVDA
ORDER BY date ASC;

INSERT INTO portfolio (date, FB_adjusted_close) 
SELECT date, FB.close
FROM FB
ORDER BY date ASC;

```

I've also tried combining them into one statement, but it it results in the code taking way longer than I think it should(each company table has about 251 rows, as should the portfolio table), so I kill it. I also here run into the issue of each company table having it's own date column and I need to join them.

```
INSERT INTO portfolio (date, GOOG_adjusted_close, CELG_adjusted_close, NVDA_adjusted_close, FB_adjusted_close) 
SELECT GOOG.date, GOOG.close, CELG.close, NVDA.close, FB.close
FROM GOOG, CELG, NVDA, FB
ORDER BY date ASC;

```

I should get data for each stock's closing price for a given date(assuming the data exists for that date. However, only the date and closing price from the first INSERT INTO works, the rest show up as null.

[Current output](https://i.stack.imgur.com/Kjc6R.png)

[Example of the CSV files, they are loaded into a table for the respective company, and from those tables into the portfolio table.](https://i.stack.imgur.com/r5zHw.png)