#include void solve() { int q; std::cin >> q; while (q--) { int x1, x2, y1, y2; std::cin >> x1 >> x2 >> y1 >> y2; std::cout << "SELECT count(*) FROM point WHERE " << "x>=" << x1 << " AND x<=" << x2 << " AND y>=" << y1 << " AND y<=" << y2 << ";" << std::endl; } } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }