KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Fundamentals Capstone 1.3

  • Fundamentals Capstone 1.3

    Posted by cd7253 on October 31, 2023 at 12:00 am


    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?

    cd7253 replied 3 months, 1 week ago 4 Members · 3 Replies
  • 3 Replies
  • megan_mcp

    November 1, 2023 at 12:00 am

    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,


  • kdbguru

    November 1, 2023 at 12:00 am


    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

  • Laura

    November 6, 2023 at 12:00 am

    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,


Log in to reply.