Not sure if you used the dbgen repo to get the queries but at this repo: https://github.com/electrum/tpch-dbgen, in the README question 8 "What will qgen create", you can find details on the specific :foo's.