I am trying to create separate shapefile using Select analysis with ArcPy by doing an SQL query to create them based on a unique value from the field. I want to create a list of the unique values in the table from a specific field since there are some duplicates of the same value in the field. I want to do a search of the table and find all the unique values and then append them to the list and then do the Select analysis to create individual shapefiles and eventually individual KML files. Thanks in advance.
Split Layers by Attributes will allow you to get individual shapefiles using a query. Inputs are a shapefile, the destination is a folder for the output shapefiles to go. You can parse the code if you have some means to create kml files directly, otherwise, explore various options on the ESRI geoprocessing website.