$ for i in `awk 'NR>1 {print $1}' file1`
do
j=$j,$i
done
$ k=`echo $j | cut -c2-`
$ query="select name from tab_user tus where tus.id in ($k)"
$ echo $query
select name from tab_user tus where tus.id in (1,2,3,10,11)
$
$
$
$ cat f9
id
1
2
3
10
11
$
$
$ perl -lne 'push @x, $_ if $.>1;
> END {print "select name from tab_user tus where tus.id in (",join(",",@x),")"}' f9
select name from tab_user tus where tus.id in (1,2,3,10,11)
$
$