containment rate is defined only on pairs of queries whose SELECT and FROM clauses are *identical*.

Containment Rate Operator
-------------------------

We denote the containment rate *operator* between queries $Q1$ and $Q2$ on database $D$ as: $$Q1 \subset_{\%}^D Q2$$ Operator $\subset_{\%}^D$ returns the containment rate between the given input queries on database $D$. That is, $Q1 \subset_{\%}^D Q2$ returns $x\%$, if $Q1$ is $x\%$-contained in query $Q2$ on database $D$. For simplicity, we do not mention the *specific* database, as it is usually clear from context. Therefore, we write the containment rate operator as $\subset_{\%}$.

Learned Containment Rates {#Learned Containment Rates}
=========================

From a high-level perspective, applying machine learning to the containment rate estimation problem is straightforward. Following the training of the CRN model with pairs of queries $(Q1,Q2)$ and the actual containment rates $Q1 \subset_{\%} Q2$, the model is used as an estimator for other, unseen pairs of queries. There are, however, several questions whose answers determine whether the machine learning model (CRN) will be successful. (1) Which supervised learning algorithm/model should be used. (2) How to represent queries as input and the containment rates as output to the model (“featurization”). (3) How to obtain the initial training dataset (“cold 