# Re: about q language

**URL:** <https://forum.kx.com/t/re-about-q-language/9002>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [July 31, 2014, 7:08pm UTC](https://forum.kx.com/t/re-about-q-language/9002 "2014-07-31T19:08:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [July 31, 2014, 7:08pm UTC](https://forum.kx.com/t/re-about-q-language/9002/1 "2014-07-31T19:08:00Z")

</div>

\>I am a q language fan in China. I’ve a problem with q programming:

\>say I have a table t:(x1:1 2 3;x2:9 8 7)

\>and a self-defined function f:{x+y\*6}

\>I want to apply select some rows from that table t

\>and apply function f to&nbsp;each row,with column x1,x2 as inputs.

\>eg: select from x where x2\>7

\>and i got

\>1 9

\>2 8

\>f[1;9],f [2;8]

\>55 50

\>how should i write this? in one select clause?

q)t:(x1:1&nbsp;2&nbsp;3;x2:9&nbsp;8&nbsp;7);f:{x+y\*6}

q)select x3:f[x1;x2] from t where x2\>7

x3

–

55

50

if your function f is not a vector function, then f’

q)select x3:f’[x1;x2] from t where x2\>7

x3

–

55

50
