I am trying to create a view from a selection. One layer contains indian states boundary as polygon and other world forest fire as points.
CREATE VIEW myview AS SELECT * FROM vnp14imgtdl_nrt_global_24h a, states b WHERE st_within(a.geom, b.geom) AND a.confidence = 'high' order by b.statename;
If I just run the select command it runs fine, but once I try to create a view it gives error stating
ERROR: column "gid" specified more than once SQL state: 42701