Fundamentals Capstone 1.3

Hello,

May someone explain whether I am on the right track for question 1.3.

My Answer:  uniqueOpts: select distinct option_id from trade

Have I completely missed the point of the question? 

Hi,

As the question asks to extract “symbol list” of all the unique options, you should use “exec” rather than “select”. While “select” returns the result of a table type, “exec” for a single column would return a list of values.

  uniqueOpts: exec distinct option_id from trade

Hi ,

Yes  is correct you should use ‘exec’ instead of ‘select’ - however this is the syntax for the statement you need:

exec … from select … from …

exec keyword | Reference | kdb+ and q documentation - Kdb+ and q documentation (kx.com)

If you have any questions please let me know,

Megan

If it is in-memory table, exec … from … should work.

Hello Megan, 

I am somehow more confused, I get an answer but it appears to be wrong.

 

Is there a tutorial that you could recommend to me? I am very new to coding. 

Hello , when I put in that code I get a message saying nyi: Not yet implemented.

I am unsure where I have gone wrong.

 

Hi  ,

You can use “select from” to extract the column from the trade table on disk, and then use “exec from” to extract the data from that column as a list. 

To help you complete the capstone project you should first go through the course materials on KX Academy, specifically Fundamentals: qSQL queries will help with this question, or check out the link that Megan sent previously exec keyword | kdb+ and q documentation.

Hope this helps, 

Laura