hello world!
query
RESULTSET
query
  ANIMAL_ID EBV
1 423445 118.985
2 427135 118.705666
3 421747 109.68
4 41372 107.04
5 412692 106.235
6 442396 105.76276
7 444583 105.25389
8 443300 104.8975
9 396162 103.163994
10 446744 103.1275
11 444725 100.915
12 419121 100.789825
13 426263 100.615
14 417381 100.38534
15 443308 100.307495
16 444171 100.270004
17 444563 100.08501
18 443305 99.1225
19 444585 97.633224
20 446759 97.277664
21 420856 96.9375
22 444545 96.93554
23 443677 95.54133
24 443309 95.229996
25 444278 95.14
26 446712 94.992584
27 417278 94.64
28 408649 92.99
29 446309 92.30958
30 425305 92.27875
31 402785 92.229996
32 426865 91.796295
33 426862 91.773125
34 443297 91.5625
35 417373 91.31625
36 446748 91.24483
37 446747 91.24483
38 431138 90.96391
39 444544 89.537704
40 426634 89.32567
41 444280 88.95
42 425247 88.88
43 431122 88.53
44 409290 87.369995
45 444177 86.919754
46 444178 86.919754
47 427033 86.869995
48 427034 86.869995
49 445050 85.91
50 446711 85.845
51 443299 85.845
52 428677 85.64
53 417279 85.537506
54 413871 85.4
55 421751 85.3095
56 409292 84.79
57 443298 84.0175
58 412046 83.60333
59 443302 82.96834
60 444169 79.72
61 411637 79.705505
62 409699 78.83
63 402722 77.035
64 446722 76.315
65 412049 75.33833
66 445848 75.127
67 407933 75.063995
68 444183 73.07
69 426840 72.79633
70 417277 71.79
71 420844 59.962666
72 387209 59.79
73 391293 56.74
74 446725 56.215
CACHED false
EXECUTIONTIME 365
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