This page contains information regarding Star Trek: Short Treks, and thus may contain spoilers.
According to the story of the girl who made the stars, Humans in Africa farmed as early as 100,000 years ago, but had trouble with the practice because they always farmed in the same place. (ST: "The Girl Who Made the Stars")
Kathryn Janeway grew up on the great plains surrounding her grandfather's farm in Indiana. (VOY: "Macrocosm", "Live Fast and Prosper") Having grown up around farmers, her parents insisted that her family learn some basic gardening skills. (VOY: "Resolutions")
An alien being who took the form of Rumpelstiltskin told Miles O'Brien a story about a farmer from Derry who tried to chase him away until he saved the farmer's crop from locusts. (DS9: "If Wishes Were Horses")
In the Paris 042 holoprogram set in 19th century Ireland, Maggie O'Halloran was supposed to marry Ray Ewan, a pig farmer "with a very large rake", according to Tom Paris. In the same program, Michael Sullivan told Katie O'Clare that there probably was no man for her in Fair Haven, unless she fancied a pig farmer. (VOY: "Fair Haven")