Zum Inhalt springen

„Benutzer:Horgner/CH status SQL“ – Versionsunterschied

aus Wikipedia, der freien Enzyklopädie
Inhalt gelöscht Inhalt hinzugefügt
KKeine Bearbeitungszusammenfassung
Zeile 2: Zeile 2:


=== Fromatierung die ein gute Abfrage vehindert ===
=== Fromatierung die ein gute Abfrage vehindert ===
<nowiki>SELECT CONCAT( '# [[', cur_title, ']])
<nowiki>SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
FROM cur
FROM cur
WHERE cur_namespace=0
WHERE cur_namespace=0
AND cur_is_redirect=0
AND cur_is_redirect=0
AND cur_text NOT LIKE '%KANTON = %'
AND cur_text NOT LIKE '%KANTON = %'
ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
LIMIT 500</nowiki>
LIMIT 500</nowiki>



Version vom 27. November 2005, 14:23 Uhr

gute Abfragen

Fromatierung die ein gute Abfrage vehindert

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text NOT LIKE '%KANTON = %'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC 
 LIMIT 500

lange Gemeinden Artikel ohne Bild

SELECT cur_namespace, cur_title, LENGTH(cur_text) as Laenge
 FROM cur
 WHERE cur_text LIKE '%Schweizer Gemeinde]]%'
 AND cur_text not LIKE '%[[Bild:%'
 ORDER BY LENGTH( cur_text ) DESC , cur_timestamp DESC
 LIMIT 2500


* Koodinaten Check

Gemeindeartikel mit voreilenden 0 in Koordinaten:

SELECT cur_title, cur_namespace, CONCAT(LENGTH( cur_text ) , ' Bytes') AS      Groesse
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz|%'
 AND (cur_text LIKE '%BREITENGRAD = 0%' OR cur_text LIKE '%LÄNGENGRAD = 0%' OR cur_text LIKE '%°_0%')
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste abgearbeitet 27.6.2005

Gemeindeartikel mit vertauschten Koordinaten:

SELECT cur_title, cur_namespace, CONCAT(LENGTH( cur_text ) , ' Bytes') AS      Groesse
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz|%'
 AND cur_text NOT LIKE '%BREITENGRAD = 4%'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste abgearbeitet 3.7.2005

* km2 Check

SELECT CONCAT( '# [[', cur_title, ']]')
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz|%'
 AND cur_text LIKE '%km2%'
 LIMIT 500

Liste abgearbeitet 2.7.2005

* Check alte Einwohnerentwicklung, Tabellenlayout

SELECT cur_title, cur_namespace, CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz|%'
 AND cur_text LIKE '%Einwohneren%'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste abgearbeitet 1.7.2005

* falsche Daten

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND (cur_text LIKE '%.12.%' OR cur_text LIKE '%. 12.%')
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste update mit Dump 15. November 2005

* Kontrolle von Wappen

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%KANTON = Wallis|%'
 AND cur_text NOT LIKE '%Wappen_fehlt.jpg%'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste für TG LU SO GR TI JU FR NE BE VD VS abgearbeitet

* Gemeinden mit Stub Baustein

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND cur_text LIKE '%{{stu%'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500
SELECT concat('# [[', cur_title, ']]'), length(cur_text) AS lung
 FROM cur
 WHERE cur_namespace = 0
 AND cur_text LIKE '%{{%stub%}}%'
 AND cur_text LIKE '%{{Ort_Schweiz%'
 HAVING lung > 1500
 ORDER BY lung DESC, cur_title LIMIT 500

* Gemeinden mit fehlender Navileiste, bringt meist Ortschaften

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND cur_text NOT LIKE '%Navigationsleiste%' 
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Liste update mit Dump 15. November 2005

* Geographie Check

SELECT cur_title 
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0 
 AND cur_text LIKE '%{{Ort_Schweiz|%'
 AND cur_text LIKE '%Geografie%' 
 LIMIT 200

Liste update mit Dump 15. November 2005

* unberechtigter Stub Baustein

SELECT concat('# [[', cur_title, ']]'), length(cur_text) AS lung
 FROM cur
 WHERE cur_namespace = 0
 AND cur_text LIKE '%{{stu%'
 AND cur_text LIKE '%{{Ort_Schweiz%'
 HAVING lung > 1300
 ORDER BY lung DESC, cur_title LIMIT 500

Liste update mit Dump 15. November 2005

* Söhne und Töchter

SELECT concat('# [[', cur_title, ']]'), length(cur_text) AS lung
 FROM cur
 WHERE cur_namespace = 0
 AND cur_text LIKE '%Söhne und Töchter%'
 AND cur_text LIKE '%{{Ort_Schweiz%'
 ORDER BY lung DESC, cur_title LIMIT 500

Liste vom 15. Oktober 2005

concat('# ', cur_title, '') lung

  1. Basel 39187
  2. Bern 23193
  3. Genf 5828
SELECT concat('# [[', cur_title, ']]'), length(cur_text) AS lung
 FROM cur
 WHERE cur_namespace = 0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND cur_text NOT LIKE '%Weblink%' 
 ORDER BY lung DESC, cur_title LIMIT 500

abgearbeitet 2. Oktober 2005

nicht so gute Abfrage

schweizbezogen Artikel

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_text LIKE '%<!--schweizbezogen-->%'
 AND NOT cur_text LIKE '%{{Begriffsklärung}}%'
 AND NOT cur_text LIKE '%#REDIRECT %'
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 20
  1. Schweizer_Fussballverein (182 Bytes)
  2. Binz_(Maur) (291 Bytes)
  3. Gamsen_VS (341 Bytes)
  4. Riviera_(Schweiz) (342 Bytes)

Check BFS Nr. u. Karte

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND (cur_text LIKE '%BFS = 0000|%' OR cur_text NOT LIKE '%BILDPFAD_KARTE = Karte Gemeinde%' OR cur_text NOT LIKE '%BILDPFAD_KARTE = Karte_Gemeinde%')
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

es kommen die falschen

  1. Liddes (708 Bytes)
  2. Sembrancher (731 Bytes)
  3. Vétroz (806 Bytes)
  4. Orsières (826 Bytes)
  5. Vollèges (826 Bytes)
  6. Lohnstorf (874 Bytes)
  7. Bourg-Saint-Pierre (928 Bytes)
  8. Ardon_VS (943 Bytes)
  9. Geschinen (943 Bytes)
  10. Romoos (988 Bytes)
  11. Gluringen (1013 Bytes)
  12. Neudorf_LU (1036 Bytes)
  13. Selma_GR (1058 Bytes)
  14. Chamoson (1069 Bytes)
  15. Hasle_LU (1089 Bytes)
  16. Mesocco (1129 Bytes)
  17. Rickenbach_SO (1141 Bytes)
  18. Ferenbalm (1252 Bytes)
  19. Mauensee_LU (1265 Bytes)

Vorlage nicht in Stadt oder Gemeinde Artikel

Abfrage hat Probleme

SELECT CONCAT( '# [[', cur_title, ']] (', LENGTH( cur_text ) , ' Bytes)' )
 FROM cur
 WHERE cur_namespace=0
 AND cur_is_redirect=0
 AND cur_text LIKE '%{{Ort_Schweiz%'
 AND (cur_text NOT LIKE '%GEMEINDEART = Stadt%' OR cur_text NOT LIKE '%GEMEINDEART = Gemeinde%')
 ORDER BY LENGTH( cur_text ) ASC , cur_timestamp ASC
 LIMIT 500

Hat nicht funktioniert, warum ?

  1. Reckingen_VS (633 Bytes)
  2. Nebikon (678 Bytes)
  3. Arbaz (685 Bytes)
  4. Salins_VS (686 Bytes)