Easy SQL Challenge: Using UNION

365 Days of Daily Coding: Day 59

If I were to say this one thing that proves that I was productive today, it would be my initial step of trying to figure out what my investment portfolio and how much risk I would like to take. I have been interested in investing in ETFs like the S&P 500 index, however, there doesnt seem to be very clear information on what are the processes for doing so if you are based in Malaysia, taxes for capital gains or dividends and the right brokerages to use. I managed to found few called eToro and Stashaway but I am not convinced yet.

Today I solved an easy challenge in sqlpad. My solution was as follows:

SELECT customer_id, first_name, last_name
  FROM customer
  WHERE first_name LIKE '%D'
  UNION
  SELECT actor_id, first_name, last_name
  FROM actor
  WHERE first_name LIKE '%D';

Leave a comment