diff --git a/relational-query.cabal b/relational-query.cabal
--- a/relational-query.cabal
+++ b/relational-query.cabal
@@ -1,5 +1,5 @@
 name:                relational-query
-version:             0.0.1.1
+version:             0.0.1.2
 synopsis:            Typeful, Modular, Relational, algebraic query engine
 description:         This package contiains typeful relation structure and
                      relational-algebraic query building DSL which can
diff --git a/src/Database/Relational/Query/Sub.hs b/src/Database/Relational/Query/Sub.hs
--- a/src/Database/Relational/Query/Sub.hs
+++ b/src/Database/Relational/Query/Sub.hs
@@ -152,10 +152,14 @@
 -- | Normalized column SQL
 normalizedSQL :: SubQuery -> StringSQL
 normalizedSQL =  d  where
-  d (Table t)             =  fromTableToNormalizedSQL t
-  d sub@(Bin {})          =  showUnitSQL sub
-  d sub@(Flat {})         =  showUnitSQL sub
-  d sub@(Aggregated {})   =  showUnitSQL sub
+  d (Table t)                 =  fromTableToNormalizedSQL t
+  d sub@(Bin {})              =  showUnitSQL sub
+  d sub@(Flat _ _ _ _ _ ots)
+    | null ots                =  showSQL sub
+    | otherwise               =  showUnitSQL sub
+  d sub@(Aggregated _ _ _ _ _ _ _ ots)
+    | null ots                =  showSQL sub
+    | otherwise               =  showUnitSQL sub
 
 selectPrefixSQL :: UntypedProjection -> Duplication -> StringSQL
 selectPrefixSQL up da = SELECT <> showsDuplication da <>
