Exploring Join Variations: Exercise

Explore how the output of the join query changes when you change the join condition or alter other statements in your project.

Exercises

Complete the following exercises to explore additional join variations. See Solutions for possible solutions to these exercises.

  1. Start the project and then send a row with a value of "YHOO" in the Symbol column into TradeInquiries. Examine the output in TradeResults. What results do you see? Why did the query produce these results? Stop the project.
  2. In the KEEP clause, change "LAST ROW" to "3 ROWS". Start the project. Wait approximately 10 seconds to allow TradesWindow to accumulate rows and then send a row with a value of "EBAY" in the Symbol column into TradeInquries. Examine the output in TradeResults. How many rows of output did the project produce? Why? Stop the project. In the KEEP clause, change "3 ROWS" back to "LAST ROW".
  3. Delete the ON clause from the Query statement, but leave the semicolon at the end of the statement. Start the project and then send a row with a value of "IBM" in the Symbol column into TradeInquries. Examine the output in TradeResults. How many rows did the project produce? Compare the values in the Price column of the output to the values in the Price column of TradesWindow. Why do you think the Query statement produced these results? Stop the project.
  4. Insert the following text immediately before the semicolon at the end of the Query statement:
    WHERE TradeInquiries.Symbol = TradesWindow.Symbol 
    

    Start the project and then send a row with a value of "EBAY" in the Symbol column into TradeInquiries. Examine the output in TradeResults. Can you detect any differences between the results of this query and the results of the earlier query that contained an ON clause instead of the WHERE clause? Stop the project.