Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
🎃
Wasteland Baby!

Emrul Hasan Zawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile
1. select distinct customer.customer_name, customer.customer_city from customer, borrower where customer.customer_name = borrower.customer_name;
2. select customer_name, customer_city from customer where customer_name in(select customer_name from borrower where loan_number in(select loan_number from loan where branch_name in(select branch_name from loan where branch_name='Perryridge')));
3. select account_number, balance from account where balance between 700 and 900;
4. select customer_name, customer_street from customer where customer_street LIKE '%Hill';
5. select distinct customer_name from borrower, loan where borrower.loan_number = loan.loan_number and branch_name = 'Perryridge' and customer_name in(select customer_name from account, depositor where depositor.account_number = account.account_number);
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
# Another one nodejs
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Qry1. select customer.customer_name, customer.customer_city from customer, borrower where customer.customer_name = borrower.customer_name;
-- >>>>>>> select customer_name, customer_city from customer where customer_name in(select customer_name from borrower);
Qry2. select borrower.customer_name, customer.customer_city from customer, borrower, loan
where customer.customer_name = borrower.customer_name and borrower.loan_number = loan.loan_number and loan.branch_name='Perryridge' ;
-- >>>>>>> select customer_name, customer_city from customer where customer_name in(select customer_name from borrower where loan_number in(select loan_number from loan where branch_name='Perryridge'));
Qry3. select account_number, balance from account where balance in (select balance from account where balance between 700 and 900);
-- >>>>>>> select account.account_number, account.balance from account where balance between 700 and 900;
@ehzawad
ehzawad / class.sql
Last active February 17, 2016 06:47
1. select max(sal), min(sal), avg(sal) , count(empno) from emp where deptno=20;
2. select max(sal), min(sal), avg(sal) ,count(empno) from emp where job='SALESMAN';
3. select max(sal), min(sal), avg(sal), comm from emp where comm>=0 group by comm;
4. select count(empno), job from emp group by job;
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
@ehzawad
ehzawad / CMAKE
Last active February 24, 2016 14:26
source: askubuntu
installation by a PPA (Upgrade to 3.2)
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
When cmake is not yet installed:
sudo apt-get install cmake
@ehzawad
ehzawad / clang.sh
Last active February 24, 2016 16:30
REFERENCE # http://llvm.org/apt/
sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT
# 3.6
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main
LLVMAPT
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
sudo aptitude install -y libgtest-dev
" But frustrating that you have build it using Cmake
cd /usr/src/gtest
sudo cmake -DCMAKEBUILDTYPE=RELEASE .
cd /tmp
mkdir .build
cd .build
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
.model small
.stack 100h
.data
a db ?
.code
main proc