GetFlips
Procedure
Introduction
Property flipping is a term used to describe properties that are purchased with the intent of making improvements to the property before returning it back to the market for a profit. The houses purchased usually need considerable repair and/or the seller is under financial stress and motivated to sell for less than market value. The buyer makes repairs and sells the property, usually after a relatively short amount of time.
Description
GetFlips() is written as a system SQL procedure that returns a SQL table containing properties considered likely to have been flipped based upon the parameters provided.
| ATTOM ID | 145695081 | 
| Address | 201 Main St, Henderson NV 89011 | 
| Acquisition Transaction ID | 745155601 | 
| Acquisition Date | 8/3/2021 | 
| Acquisition Amount | $245,000 | 
| Acquisition Grantor | Homer & Marge Simpson - 201 Main St, Henderson NV 89011 | 
| Acquisition Grantee | Krusty Investments LLC - 19 Fish Smell Drive, Springfield NV 80085 | 
| Sale Transaction ID | 875177609 | 
| Sale Date | 11/2/2021 | 
| Sale Amount | $195,000 | 
| Sale Grantor | Krusty Investments LLC - 19 Fish Smell Drive, Springfield NV 80085 | 
| Sale Grantee | Nelson Muntz - 123 Fake Street, Springfield NV 80085 | 
Parameters
FlipsSoldSince (Date): The earliest date to be used in identifying property sales - e.g. '20220101'
CounyName (VarChar): The name of the county to search - e.g. 'Douglas'
State (Char): The two-character code for the state in which the county is found - e.g. 'CO'
Example
In this first example, we will get a list of property flips from Douglas County, CO since 1/1/2022
	 Select * from GetFlips('20220101','Douglas','CO')
In this next example, we will get a list of property flips from three counties in Texas since 1/1/2022
Select * from adw.GetFlips('20220101','Harris','TX')
Union
Select * from adw.GetFlips('20220101','Bexar','TX')
Union
Select * from adw.GetFlips('20220101','Travis','TX')
    