PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Expand]Guide for PANTHEON
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Collapse]Guide for PANTHEON Farming
   [Expand]Introduction to PANTHEON Farming
   [Expand]Settings
   [Expand]Livestock
   [Expand]Crops & Vegs
   [Expand]Grapes & Wine
   [Expand]Fruits & Nuts
   [Expand]Tools
   [Expand]Goods
   [Expand]Financials
   [Collapse]Analytics
    [Collapse]Ad-Hoc Analysis
      Agronomy - 000027 - Overview of done&planned Hours
      Agronomy - 000028 - Overview of planned external r
      Agronomy - 000029 - Comparison of done and planned
      Cattle - Reproduction analysis
      Cattle - Animal sorting by group and age
      Cattle - Age and productivirty correlation
      Cattle - Cows age and productivity overview
      Cattle - Sum of animal by status
      Agronomy - 000011 - Estimate yield per plant within plan
      Agronomy - 000012 - Planned yields and Areas within Crop ro
      Agronomy - 000013 - Estimate total cost within Plan
      Agronomy - 000014 - Estimate profit within Plan
      Agronomy - 000015 - Duration and planned yield of EM versio
      Agronomy - 000016 - Resource QTY and material and fuel cost
      Agronomy - 000017 - Estimated profit for EM
      Agronomy - 000020 - Comparison Planned/Achieved yield and y
      Agronomy - 000021 - Comparison of planned and achieved yiel
      Agronomy - 000022 - Comparison planned ans realized materia
      Agronomy - 000023 - Comparison of planned and used Fuel QTY
      Agronomy - 000024 - Self-propelled distribution
      Agronomy - 000025 - Monthly comparison of planned and reali
      Agronomy - 000026 - Comparison planned and realized yields
    [Expand]Dashboard
    Help & Desktop
   [Expand]Messages and Warnings in Pantheon Farming
   [Expand]Wizard functionalities
   [Expand]History - NO LONGER IN USE
   [Expand]MOBILE APPLICATION - mFA
 [Collapse]User Manuals for PANTHEON
  [Expand]User Manual for PANTHEON
  [Expand]User Manual for PANTHEON Retail
  [Expand]User manual for PANTHEON Vet
  [Expand]User Manual for PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Guides for PANTHEON Web
  [Expand]Guide for PANTHEON Web Light
  [Expand]Guide for PANTHEON Web Terminal
  [Expand]Guide for PANTHEON Web Legal
  [Expand]Old products Archive
 [Collapse]User Manuals for PANTHEON Web
  [Expand]Getting started PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
  [Expand]User Manual for PANTHEON Web Terminal
  [Expand]User Manual for PANTHEON Web Legal
  [Expand]Old products Archive
[Collapse]PANTHEON Granules
 [Collapse]Guides for PANTHEON Granules
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]Dashboard Granule
  [Expand]B2B Orders Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
 [Collapse]User Manuals for PANTHEON Granules
  [Expand]Getting started
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]B2B Orders Granule
  [Expand]Dashboard Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
  [Expand]Archive
[Expand]User Site

Load Time: 468.772 ms
"
  1005308 | 217740 | 352829 | Published
Label

Overview of age and productivity of cows

Cattle - Cows age and productivity overview

declare @animalType varchar(3)
set @animalType=(SELECT acSetOfItemCattle FROM dbo.tFA_Param)
select ls.acAnimal as Animal_ID, 
        ls.acName, 
        convert(date, ls.adDateBirth) as DateBirth, 
        dd.mF as AgeInMonths, 
        mi.anAllMilkKG as anLastMilkKg
from vFA_LiveStock ls
left join 
( select 
    acAnimal, 
    MAX(anQId) as maxID
  from tfa_livestockmilk 
  group by acAnimal) m on m.acAnimal = ls.acAnimal 
left join tfa_livestockmilk mi on mi.anQId = m.maxID
CROSS APPLY fFA_GetDateDiffYMD(ls.adDateBirth, GETDATE()) as dd
where ls.acSetOfAnimalType = @animalType
order by dd.mF desc


 

Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!