Recent programs

Table

an anonymous user · December 06, 2021 · SQL
-- create a table
CREATE TABLE students (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  gender TEXT NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 'M');
INSERT INTO students VALUES (2, 'Joanna', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'F';

EKPU_412

an anonymous user · December 06, 2021 · SQL
CREATE TABLE Worker (
  WORKER_ID INT PRIMARY KEY,
  FISRT_NAME CHAR(25),
  LAST_NAME CHAR(25),
  SALARY INT(15),
  JOINING_DATE DATETIME,
  DEPARTMENT CHAR(25)
);

INSERT INTO Worker (WORKER_ID, FISRT_NAME, LAST_NAME, SALARY, JOINING_DATE, DEPARTMENT)

r

an anonymous user · December 06, 2021 · R
#t = 1:50
y = 2.5*sin(t*pi/60)+rnorm(t)
plot(t,y,type="l",main ="Line plot")

lty_val = 1:6
plot(lty_val,axes = FALSE,ann=FALSE,type="n")
abline(h=lty_val,lwd=2,lty=lty_val)
mtext(lty_val,at=lty_val,side=2)
title("Line types(lty)")

plot(t,y,lwd=2,type="l")

Calculator_AlceraIvanGeorge

an anonymous user · December 06, 2021 · Python
a = float(input("Enter first number: "))
b = input("Enter operator: ")
c = float(input("Enter second number: "))
if b == "+":
    print(a + c)
elif b == "-":
    print(a - c)
elif b == "*":
    print(a * c)
elif b == "/":
    print(a / c)

Calculator_Frivaldo, Gabriel

an anonymous user · December 06, 2021 · Python
print("Calculator by Frivaldo,Gabriel")
a = float(input("Enter first number: "))
b = input("Enter operator: ")
c = float(input("Enter second number: "))

if b == "+":
    print(a + c)

elif b == "-":
    print(a - c)

Calculator_Frivaldo, Gabriel

an anonymous user · December 06, 2021 · Python
print("Calculator by Frivaldo,Gabriel")
a = float(input("Enter first number: "))
b = input("Enter operator: ")
c = float(input("Enter second number: "))

if b == "+":
    print(a + c)

elif b == "-":
    print(a - c)

Calculator_Frivaldo, Gabriel

an anonymous user · December 06, 2021 · Python
print("Calculator by Frivaldo,Gabriel")
a = float(input("Enter first number: "))
b = input("Enter operator: ")
c = float(input("Enter second number: "))

if b == "+":
    print(a + c)

elif b == "-":
    print(a - c)

Create Customer and References tables

an anonymous user · December 06, 2021 · SQL
-- create a table customer
CREATE TABLE Customer (
    customerID serial,
    firstname char(20) NOT NULL,
    lastname char(20) NOT NULL,
    cusStreetNum int(10) NOT NULL,
    cusStreetName varchar(20) NOT NULL,
    cusCity varchar(30) NOT NULL,
    cusState char(30) NOT NULL,
    cusZipcode int(15) NOT NULL,
    cusPhoneNo int(15) NOT NULL,

Create Customer and References tables

an anonymous user · December 06, 2021 · SQL
-- create a table customer
CREATE TABLE Customer (
    customerID serial,
    firstname char(20) NOT NULL,
    lastname char(20) NOT NULL,
    cusStreetNum int(10) NOT NULL,
    cusStreetName varchar(20) NOT NULL,
    cusCity varchar(30) NOT NULL,
    cusState char(30) NOT NULL,
    cusZipcode int(15) NOT NULL,
    cusPhoneNo int(15) NOT NULL,
CREATE TABLE IF NOT EXISTS Worker
(
WORKER_ID INT,
FIRST_NAME CHAR(25),
LAST_NAME CHAR(25),
SALARY INT(15),
JOINING_DATE DATETIME,
DEPARTMENT CHAR(25)
);

INSERT INTO Worker

PROG_2

an anonymous user · December 06, 2021 · SQL
CREATE TABLE student 
( enrollment_no INT(12) NOT NULL, 
s_firstname varchar(50) NOT NULL, 
s_lastname varchar(50) NOT NULL, 
branch CHARACTER(20) NOT NULL); 
CREATE TABLE employees 
( employee_number INT(10) NOT NULL, 
employee_name varchar(50) NOT NULL, 
department_id INT(10), 
CONSTRAINT employees_pk PRIMARY KEY (employee_number) 
); 

entry

an anonymous user · December 06, 2021 · SQL
-- create a table
CREATE TABLE students
(
  ID int,
  name varchar(50),
  city varchar(50),
  religion varchar(50),
  country varchar(50),
  )
  select * from students
  (

Spital

an anonymous user · December 06, 2021 · SQL
CREATE TABLE Pacienti (
  CNP_P NUMBER(13) PRIMARY KEY,
  Nume TEXT NOT NULL,
  Prenume TEXT NOT NULL,
  Data_nasterii date not NULL,
  Sex VARCHAR2(1) NOT null
);

INSERT INTO Pacienti VALUES (333222111, 'Ryan', 'Maricel', '12.12.1912', 'M');
INSERT INTO Pacienti VALUES (222333111, 'Popescu', 'Joanna', '31.04.1987', 'F');

Spital

an anonymous user · December 06, 2021 · SQL
CREATE TABLE Pacienti (
  CNP_P NUMBER(13) PRIMARY KEY,
  Nume TEXT NOT NULL,
  Prenume TEXT NOT NULL,
  Data_nasterii date not NULL,
  Sex VARCHAR2(1) NOT null
);

INSERT INTO students VALUES (333222111, 'Ryan', 'Maricel', '12.12.1912', 'M');
INSERT INTO students VALUES (222333111, 'Popescu', 'Joanna', '31.04.1987', 'F');

Петър Толумов 12г клас Н16

an anonymous user · December 06, 2021 · SQL
CREATE TABLE courses(
id_courses INT NOT NULL PRIMARY KEY,
name_courses VARCHAR(50)
);
CREATE TABLE students(
id_students INT NOT NULL PRIMARY KEY,
name_students VARCHAR(80),
id_courses INT,
CREATE TABLE courses_students(
id_courses INT,
id_students INT,

custOrder

an anonymous user · December 06, 2021 · SQL
-- create a table
CREATE TABLE custOrder (
  orderID serial NOT NULL,
  customerID serial NOT NULL,
  paymentID serial NOT NULL,
  orderDate date NOT NULL,
  paid int(500) NOT NULL,
  paymentDate date NOT NULL,
  shippingDate date NOT NULL,
  PRIMARY KEY (orderID),
  FOREIGN KEY (customerID)

Exercise Code

an anonymous user · December 06, 2021 · SQL
create table stocks (
    symbol text primary key not NULL,
    name text not null,
    date date,
    price INTEGER
);

insert into stocks(symbol, name, price) values('DJI', 'Dar Jones Global', 34580);
insert into stocks values ('NASDAQ', 'NASDAQ Composite', 2021-05-02, 15085);

select * from stocks;

SQL-1

senith · December 06, 2021 · SQL
-- create a table
CREATE TABLE students (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  gender TEXT NOT NULL
);
-- insert some values
INSERT INTO students VALUES (1, 'Ryan', 'M');
INSERT INTO students VALUES (2, 'Joanna', 'F');
-- fetch some values
SELECT * FROM students WHERE gender = 'F';

sapna

an anonymous user · December 06, 2021 · SQL
-- create a table
CREATE TABLE Customers(
  CustomerID INTEGER PRIMARY KEY,
  CustomerName TEXT NOT NULL,
  ContactName TEXT NOT NULL,
  Address TEXT NOT NULL,
  City TEXT NOT NULL,
  PostalCode TEXT NOT NULL,
  Country TEXT NOT NULL,
);
-- insert some values

company2

an anonymous user · December 06, 2021 · SQL
create table company2(name integer(10),dept varchar(09),salary integer(10));
insert into company2 values("sathya","finance",8000);
insert into company2 values("goamthi","purchase",6000);
insert into company2 values("kaviya","sales",9000);
insert into company2 values("karthicka","marketing",10000);
insert into company2 values("arun","purchase",2500);
insert into company2 values("sindhu","marketing",6700);
insert into company2 values("anu","purchase",7800);
select*from company2;
select dept,sum(s