freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

Delete all templates that were not created by admin on freme-dev #63

Closed jnehring closed 8 years ago

jnehring commented 8 years ago

I deleted 4115 templates that were not created by the admin using SQL commands. Then I deleted 4 templates with obvious test data and there were 50 templates left in the database.

Using this query I could find 30 dublicates:

SELECT template.*, count.count from template, 
(SELECT count(query) count, query FROM template GROUP BY query) count
WHERE template.query=count.query ORDER BY count DESC, query;

I deleted these dublicates. Now there are 20 templates in the database with distinct queries.