Hallo,
ich bin relativ neu in der Materie und brauche Hilfe.
Mein Problem,
ich habe mehrere Tabellen von denen ich die Zeilenanzahl mit COUNT(*) abrufe, jedoch mit where Klausel. es handelt sich um 8 abfragen die ich ohne probleme einzeln formulieren konnte.
--> alles dasselbe schema
jetzt würde ich das ganze gerne in eine Ergebnistabelle, d.h. eine CREATE TABLE, oder INSERT INTO anweisung mit select anweisung und 8 count(*), die nicht mit UNION alle Werte in einer Spalte speichert...
Ergebnisttabelle:
wert1|wert2|wert3|...
-----------------------------
8 | 3| 5 |.....
Meine Frage:
Da ich keine Vorstellung habe wie ich die ganzen selects bündeln kann soll oder verbinden kann hatte ich gehofft hier einen tipp zu bekommen ob eine Realisierung möglich ist und wenn ja wie?
lG DW
ich bin relativ neu in der Materie und brauche Hilfe.
Mein Problem,
ich habe mehrere Tabellen von denen ich die Zeilenanzahl mit COUNT(*) abrufe, jedoch mit where Klausel. es handelt sich um 8 abfragen die ich ohne probleme einzeln formulieren konnte.
SELECT count(*)AS "Zahl1" FROM tabelle1 where wert1 >= 1222935000 and wert1 < 1222938600;
jetzt würde ich das ganze gerne in eine Ergebnistabelle, d.h. eine CREATE TABLE, oder INSERT INTO anweisung mit select anweisung und 8 count(*), die nicht mit UNION alle Werte in einer Spalte speichert...
Ergebnisttabelle:
wert1|wert2|wert3|...
-----------------------------
8 | 3| 5 |.....
Meine Frage:
Da ich keine Vorstellung habe wie ich die ganzen selects bündeln kann soll oder verbinden kann hatte ich gehofft hier einen tipp zu bekommen ob eine Realisierung möglich ist und wenn ja wie?
lG DW
Comment