Mast head image

Pasture Yields by Area Symbol

This script retrieves the pasture yields by area symbol.


Text highlighted in yellow in the example script can be changed for a particular area, or you can use wildcards to get an entire State. Examples can be found on the Tips page.

Tips Page

Copy the example script below and paste it into the query page on the Soil Data Access site.

Soil Data Access Query Page

Example Script

SELECT DISTINCT

saversion AS Version, saverest AS Date, l.areasymbol AS Area_symbol, l.areaname AS Area_name,

musym AS Map_unit_symbol, muname AS Map_unit_name, mu.mukey AS MUKEY, compname AS Component,

comppct_r AS Component_percentage, coc.cropname AS Crop_name, coc.nonirryield_r AS Yield, coc.yldunits AS Units

FROM sacatalog AS sac

INNER JOIN legend AS l ON l.areasymbol = sac.areasymbol AND l.areatypename = 'Non-MLRA Soil Survey Area'

INNER JOIN mapunit AS mu ON mu.lkey = l.lkey

INNER JOIN component AS c ON c.mukey = mu.mukey

LEFT OUTER JOIN cocropyld AS coc ON coc.cokey = c.cokey

WHERE sac.areasymbol LIKE 'WA%' AND coc.nonirryield_r IS NOT NULL AND coc.cropname LIKE '%pasture%'

AND majcompflag = 'Yes'

ORDER BY l.areasymbol, musym, compname, comppct_r DESC

Example Table Output

Description of tables and columns can be found on this link: Table and Column Descriptions

Version Date Area_symbol Area_name Map_unit_symbol Map_unit_name MUKEY Component Component_percentage Crop_name Yield Units
17 9/8/2016 5:56:27 PM WA001 Adams County, Washington 5 Bagdad silt loam, 0 to 7 percent slopes 806562 Bagdad 100 Pasture 5 AUM
17 9/8/2016 5:56:27 PM WA001 Adams County, Washington 6 Bagdad silt loam, 7 to 25 percent slopes 806563 Bagdad 95 Pasture 5 AUM
17 9/8/2016 5:56:27 PM WA001 Adams County, Washington ABB Anders silt loam, 0 to 5 percent slopes 68122 Anders 100 Pasture 1.5 AUM



Helping People Help the Land

USDA is an equal opportunity provider, employer, and lender.