hello world!
query
RESULTSET
query
  ANIMAL_ID EBV
1 427128 138.99301
2 392364 138.8
3 427057 122.40767
4 427127 119.47633
5 427126 119.47633
6 395371 118.7
7 423445 118.495
8 427135 117.83133
9 427134 117.83133
10 423422 115.99467
11 427082 114.841324
12 421747 107.22
13 442396 105.26276
14 444583 104.71467
15 408988 104.17
16 412692 103.545
17 443300 103.0225
18 396162 102.116
19 406774 101.536
20 419121 99.96183
21 443308 98.6175
22 444563 97.64067
23 443305 97.5225
24 444585 97.097336
25 427071 96.752335
26 420856 96.0375
27 444545 95.58963
28 443309 95.56617
29 443677 94.84601
30 444278 93.47566
31 444171 93.369995
32 425305 91.55688
33 402785 91.485
34 427050 91.211334
35 426865 91.06754
36 426862 91.04
37 427067 90.60567
38 417373 90.595
39 409024 90.25333
40 431138 90.22829
41 443297 90.1625
42 426634 89.88667
43 444544 89.74644
44 417278 89.64266
45 409290 88.195
46 444280 87.26567
47 444178 87.19205
48 444177 87.19205
49 409292 86.35734
50 409699 84.72
51 413871 84.64
52 417279 84.61367
53 443302 84.44117
54 421751 84.28408
55 427040 84.17334
56 412046 82.99433
57 411637 78.982666
58 404522 78.66
59 402722 76.47
60 412049 75.54367
61 407933 74.276665
62 444183 72.585
63 426840 70.591
64 417277 67.66133
65 420844 58.872
66 387209 57.85
67 391293 55.89
CACHED false
EXECUTIONTIME 332
SQL select a.animal_id, c.ebv from animal a, cbv c where c.animal_id = a.animal_id and c.ebv_type in ( 0, 1 ) and c.trait_cd = 'CIndx' and a.breed_cd = 'AI' and a.sex_cd = 'M' and ( a.logo = 'C' or a.animal_id in ( select animal_id from aka where animal_id = a.animal_id and logo = 'C' ) ) and ( exists ( select 1 from animal p, aka x where p.animal_id = x.animal_id and p.sire_id = a.animal_id and p.birth_date > date('today') - date('2 years') and ( p.logo = 'C' or x.logo = 'C' ) ) or a.birth_date > date('today') - date('2 years' ) ) order by ebv desc