blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
fab688c97b382c13695cd9a2c9008d48923c0657 | SQL | arthad1995/project-fuse-2.0-server | /src/main/resources/db/migration/V7__interview.sql | UTF-8 | 531 | 3 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS interview (
id INT(11) PRIMARY KEY AUTO_INCREMENT,
start_time DATETIME,
end_time DATETIME
);
ALTER table project_invitation
ADD(interview_id INT(11),
type varchar(20));
UPDATE project_invitation
set type = 'Join';
ALTER table team_invitation
ADD(interview_id INT(11... | true |
1871bd79b88252a112401191ee02cd5689eec774 | SQL | dingjinhui821/julive_database | /schema/julive_ods/yw_deal_reward_history.sql | UTF-8 | 3,102 | 3.3125 | 3 | [] | no_license | drop table if exists ods.yw_deal_reward_history;
create external table ods.yw_deal_reward_history(
id int comment 'id',
reward_id int comment '合同外收入id',
deal_id ... | true |
6acd407d27ed0180869df7bc652ac8f3c25d9ff4 | SQL | yeonhwa-jung/Semi | /healthyNhappy/src/dto/order.sql | UTF-8 | 603 | 3.515625 | 4 | [] | no_license | CREATE TABLE ORDER_PRD
(
ORDER_SEQ NUMBER(8) PRIMARY KEY,
ORDER_ID VARCHAR2(50),
ORDER_REQUEST VARCHAR2(500) NOT NULL,
ORDER_DATE DATE NOT NULL,
ORDER_ADDRESS VARCHAR2(50) NOT NULL,
ORDER_PRICE NUMBER(10) NOT NULL
);
ALTER TABLE ORDER_PRD
ADD CONSTRAINT FK_ORDER_ID FOREIGN KEY(ORDER_ID)
RE... | true |
ba79d417b50baf7bde62d203afe502e16253c1cc | SQL | TheBoyMoe/DataScience-Repo | /01-sql/projects/01-sql-crud-operations.sql | UTF-8 | 580 | 3.390625 | 3 | [] | no_license | create table friends (
id integer primary key,
name text,
birthday date
);
insert into friends
values(1, 'Jane Doe', '1990/05/30');
insert into friends
values(2, 'Tom Smith', '1908/12/01');
insert into friends
values(3, 'John Smith', '1976/09/23');
select * from friends;
update friends
set name = 'Jane Smith'... | true |
9f34e758120d0a44bc10a9d248490ca734a0b5c8 | SQL | WeiyiDeng/Dataset_code | /create_get_neighbours.sql | UTF-8 | 201 | 2.546875 | 3 | [] | no_license | create table get_neighbours(USER char, FROM_UTS integer, TRACK_ID integer, COUNT_mod integer);
insert into get_neighbours
select * from dt7
where USER in (SELECT * from dba.Neighbour_username_list) | true |
697a5f0d0c7f31972c17ca5cd22e0524e7cd2402 | SQL | zhangtao106/myProject | /student/student_core/src/main/resources/schedul/t_role.sql | UTF-8 | 1,065 | 3 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : FightingHeart
Source Server Type : MySQL
Source Server Version : 50725
Source Host : localhost:3306
Source Schema : project
Target Server Type : MySQL
Target Server Version : 50725
File Encoding : 65001
Date: 03/08/201... | true |
a965d4435465c6328eb2506c989d60b740b5b011 | SQL | Raj-18110/New | /Assingment (09_15_2018)/Billing.sql | UTF-8 | 8,351 | 3.203125 | 3 | [] | no_license | create table BillingCustomer
(CustomerId number(20) NOT NULL,
PRIMARY KEY (CustomerId),
firstName varchar2(20) NOT NULL,
lastName varchar2(20) NOT NULL,
emailId varchar2(20) NOT NULL
);
alter table BillingCustomer
add adharNo number(20) NOT NULL
add pancardNo varchar2(20)
add dateOfBirth varchar2(20... | true |
6960b511552226e5a9408a44cbcaa6567bfd8369 | SQL | nkhaldi/Data-Base | /Stepik/task_2_3_09.sql | UTF-8 | 810 | 3.78125 | 4 | [] | no_license | /*
База данных магазина store.
Выведите список всех источников клиентов и
суммарный объем заказов по каждому источнику.
Результат должен включать также записи для источников,
по которым не было заказов.
В запросе для соединения нескольких источников данных
операцию соединения можно использовать многократно.
*/
... | true |
7dcb02ebaa3a2716ff54b2abb3e132bbae6a3e6b | SQL | kamalhabieb/Simple-Bookstore | /ONLINE_BOOK_STORE.sql | UTF-8 | 9,453 | 3.953125 | 4 | [] | no_license | -- -----------------------------------------------------
-- Schema ONLINE_BOOK_STORE
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema ONLINE_BOOK_STORE
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `ONLINE... | true |
878fce2c8fc9aff8b55322c98709be4d0b692ef2 | SQL | ptrumpy/Sample-SQL-Code | /OrderLineDailyWithFOEfromOrdersDaily.sql | UTF-8 | 340 | 3.609375 | 4 | [] | no_license | select o.foedate, d.itemNumber, d.itemQty, d.UnitPrice, d.Season, d.OrderStatus, d.CatalogCodePrefix
from orderlinedaily d left join ordersdaily o on
o.accountnumber = d.accountnumber and o.ordernumber = d.ordernumber
Where d.catalogcodeprefix in ('RK', 'RW') and d.orderstatus = 'F'
order by itemnumber, d.catalo... | true |
8045edd3f21696296230e122c1e556c823aad0b7 | SQL | AmilcarArmmand/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/10-top_score.sql | UTF-8 | 211 | 2.796875 | 3 | [] | no_license | -- script that lists all records of the table second_table of the database
-- in MySQL server, results will display the score and name in order by score
SELECT score, name FROM second_table ORDER BY score DESC;
| true |
5eef38244b397c5f409ae3dc7afb16ecaecce200 | SQL | DFLBB/TFM_archs | /script_mariadb_carga_inicial/CARGA_INICIAL_BlockChain/_JSON_PERROS_propietarios.sql | UTF-8 | 1,714 | 2.875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: tfm.cnhygfwtvffy.eu-west-3.rds.amazonaws.com
-- Versión del servidor: 10.4.8-MariaDB-log - Source distribution
-- SO del servidor: Linux
-- HeidiSQL Versión: 11.0.0.5919
-- ----------------... | true |
9626e44c4803f3b56af88d36e208e79e390ee519 | SQL | RBC1B/ROMS | /database/004.sql | UTF-8 | 1,074 | 3.53125 | 4 | [
"MIT"
] | permissive | use ROMS;
create table FixedReport (
FixedReportId bigint(20) not null auto_increment,
Name varchar(100) not null unique,
Description varchar(250),
Query text not null,
Active boolean not null default true,
UpdateTime ti... | true |
973c5687b22603636d8f8bb4f7273eb81bd55d3e | SQL | SrNetoChan/PGHP | /versioning_example.sql | UTF-8 | 2,783 | 3.78125 | 4 | [] | no_license |
-- USAGE EXAMPLE
-- the original table
-- ATTENTION: for now, the name "gid" must be always used as primary key
CREATE TABLE "PGHP_2".testes_versioning(
gid serial primary key,
descr varchar(40),
geom geometry(MULTIPOLYGON,3763)
);
CREATE INDEX testes_versioning_idx
ON "PGHP_2".testes_versioning
USING gist
(ge... | true |
e4ec9d540e96f1567e2d6e785ebe8e9ac8648fd8 | SQL | abdulgonimurod1/projek_shakeelamart | /shakeelasmart.sql | UTF-8 | 22,359 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Jun 2021 pada 06.03
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
260317d803979e8965cadf8c64b0cacd20cb6e74 | SQL | hendisantika/Online-banking-angular-springboot-mysql | /src/main/resources/db/migration/V4__20190307_Init_Appointment_Tables_Data.sql | UTF-8 | 1,060 | 3.78125 | 4 | [] | no_license | -- CREATE DATABASE IF NOT EXISTS onlinebanking
-- USE onlinebanking;
--
-- Table structure for table appointment
--
DROP TABLE IF EXISTS appointment;
CREATE TABLE appointment
(
id bigint(20) NOT NULL AUTO_INCREMENT,
confirmed bit(1) NOT NULL,
date datetime DEFAULT NULL,
descripti... | true |
a549c791e8055c9f718e0b85f8c4bc56483010ef | SQL | shyrik13/db3_2 | /sql/views.sql | UTF-8 | 883 | 2.90625 | 3 | [] | no_license |
create or replace view LIDOSTA_DARBINIEKS_GRAFIKS_SKATS of LIDOSTA_DARBINIEKS_GRAFIKS_SKATS_TYPE
with object identifier(strada_no, strada_lidz) as
select LD.LIDOSTA_DARBINIEKS_ID, LD.VARDS, LD.UZVARDS,
LD.STATUS, LD.DARBA_POZICIJA, LD.LIDOSTA_ID,
LDG.STRADA_NO, LDG.STRADA_LIDZ, LDG.NEDELAS_DIENA
from... | true |
d9d3820a1b3849b77a516feaba5e028c4bafacb8 | SQL | kimsuyeon07/dbstudy | /DB_sql/13_기본SQL 작성하기_DQL활용1_2.sql | UTF-8 | 5,468 | 4.25 | 4 | [] | no_license | -- << employees 테이블 >> --
-- 1. 전체 사원의 모든 칼럼을 조회한다.
select * from employees;
-- 2. 전체 사원의 first_name, last_name, job_id 를 조회한다.
select first_name, last_name, job_id from employees;
-- 3. 연봉(salary)이 12000 이상되는 사원들의 last_name, salary 를 조회한다.
select last_name, salary from employees where salary >= 12000;
-- 4. 사원번호(... | true |
b93968024031f1de359757927e618e5b4d2a21b4 | SQL | radtek/Telecommunication | /GSM/DataBase/PROCEDURES/WWW_GET_USER_PHONE.sql | WINDOWS-1251 | 454 | 2.640625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE WWW_GET_USER_PHONE(
pUSER_ID IN INTEGER,
pPHONE_NUMBER OUT VARCHAR2
) IS
--#Version=1 ..
BEGIN
SELECT CONTRACTS.PHONE_NUMBER_FEDERAL INTO pPHONE_NUMBER
FROM CONTRACTS
WHERE pUSER_ID=CONTRACTS.CONTRACT_ID;
END;
/
GRANT EXECUTE ON WWW_GET_USER_PHONE TO LONTANA_WWW;
/
CREA... | true |
638c044f7f5fbcd7e6d881bb6aad1687a6f4fe3e | SQL | trzye/Projekt-zespolowy | /server/init.sql | UTF-8 | 2,058 | 3.40625 | 3 | [] | no_license | SET GLOBAL max_allowed_packet = 1024*1024*1024*1024;
drop table if exists rating;
drop table if exists comment;
drop table if exists characteer;
drop table if exists franchise;
drop table if exists photo;
drop table if exists observation;
drop table if exists user;
drop table if exists binary_photo;
create table bina... | true |
a52fb65d990b022293269fdd64e50a2d570d231c | SQL | wjphappy90/JiaGou | /08architect-stage-6-optimize/数据库调优相关材料/GROUP BY语句优化.sql | UTF-8 | 1,136 | 4.0625 | 4 | [] | no_license | -- 查询每个员工拿到过的最少的工资是多少[比惨大会]
/*
* 分析这条SQL如何执行:
* [emp_no, salary] 组合索引
* [10001,50000]
* [10001,51000]
* ...
* [10002,30000]
* [10002,32000]
* ...
* 1. 先扫描emp_no = 10001的数据,并计算出最小的salary是多少,[10001,50000]
* 2. 扫描emp_no = 10002,并计算出最小的salary是多少,[10002,30000]
* 3. 遍历出每个员工的最小薪资,并返回
===
* 改进:(松散索引扫描)
* 1. 先扫描em... | true |
2276275efeae14854acf5c4fb98eabc381d9aaad | SQL | radtek/abs3 | /sql/mmfo/bars/Function/f_dkon_kv.sql | UTF-8 | 1,311 | 2.9375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/function/f_dkon_kv.sql =========*** Run ***
PROMPT =====================================================================================
CREATE OR REPLACE FUNCTION BA... | true |
b37944c8000bcbcce53bba6d909cc31611ea03b5 | SQL | L0TTS/hw | /sql/schema_and_data.sql | UTF-8 | 794 | 2.96875 | 3 | [] | no_license | create table Course
(
id serial primary key,
name varchar(20) not null,
time varchar(20) not null,
id_teacher integer not null
);
create table Lesson
(
id serial primary key,
name varchar(20) not null,
time varchar(20) not null,
id_course integer ... | true |
5f0ee8d5aabd58b8424e93b6c603dc5ac86de23a | SQL | lizhengbo/stunning-learn | /oracle/merge into.sql | UTF-8 | 1,915 | 3.375 | 3 | [] | no_license | update evi_arb_case eac
set eac.store_channel =
(select edm.chnl_source
from evi_data_main edm
where eac.cont_no = edm.deal_id)
where eac.id = (select eac.id from evi_data_main edm where eac.cont_no = edm.deal_id);
merge into evi_arb_case eac
using evi_data_main edm
on (eac.cont_no = edm.... | true |
b3957900ec71f3ccfc09f67575f9957ac09f958a | SQL | vstange/testdump | /src/main/resources/sql/neq_function.sql | UTF-8 | 234 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | -- drop previous function
DROP FUNCTION NEG;
-- create new function "neg": binary negative
CREATE FUNCTION NEG (N_IN DOUBLE)
RETURNS DOUBLE
BEGIN
DECLARE N_OUT DOUBLE;
IF N_IN = 0 THEN RETURN 1;
ELSE RETURN 0;
END IF;
END; | true |
758f720e03faf9a4f9ee4348f1ffa1eafc156f96 | SQL | SA-Inc/SQL-EX-ru-Notes-and-Solutions | /33.sql | UTF-8 | 152 | 2.90625 | 3 | [] | no_license | -- Get the ships sunk in the North Atlantic battle.
-- Result set: ship.
SELECT ship
FROM Outcomes
WHERE battle = 'North Atlantic' AND result = 'sunk'
| true |
151241c5fda7bf92812d670e568a89b2ca66ff9b | SQL | Jeyaraj1982/tpms | /tpms.sql | UTF-8 | 26,326 | 3.078125 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v8.18
MySQL - 5.6.41-84.1-log : Database - nahami_tpms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_... | true |
8bd3516940a1f12a0b6feaa12af64006f41bc874 | SQL | MeiQuant/EagleEye | /sql-record.sql | UTF-8 | 4,506 | 3.390625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2016-08-01 08:20:44
-- 服务器版本: 5.7.12
-- PHP Version: 5.6.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... | true |
26be6b3fed5b63bbe886e27c47b14fde72743d70 | SQL | hodlevy/minip | /queries/q4.sql | UTF-8 | 135 | 2.546875 | 3 | [] | no_license | select distinct cityName
from oehrlich.city natural join oehrlich.branch natural join oehrlich.malfunction m
where m.isfixed = 'no'
| true |
fdaca778d8188598b92c7c1e27d85f0e4b1a0d86 | SQL | korlu/TOWSONBMC | /bws6000L/wwwt-lab/teaching/proj5/v1.sql | UTF-8 | 441 | 4.0625 | 4 | [] | no_license | /* Create a view that show each movie's director, actor/actress */
/* and its casts. */
drop view movie_cast cascade constraints;
create view movie_cast
as select m.title, d.last_name, c.name_played, a.act_name
from movies m, directors d, casts c, actors_actresses a
where m.mid=d.mid and m.mid=c.mid and c.act... | true |
bca1ccd3431c093eed147911bcd32782fcc09ce1 | SQL | datduyng/ideachain | /archives/db.sql | UTF-8 | 7,610 | 3.484375 | 3 | [] | no_license | -- first, run
/**
-- intial setup
sqlite3 .data/sqlite.db
.mode column
.headers on
.timer on
--
.read archives/db.sql
-- save the sqlite data base
sqlite3 .data/sqlite.db .dump > output.sql
--delete a table and restart primarykey counter
delete from your_table;
delete from sqlite_sequence where name='your_tab... | true |
0d11bb9c880b4138d779189befe6a89160afe1fa | SQL | memememomo/generator_template | /tmpl/create.sql | UTF-8 | 269 | 2.859375 | 3 | [] | no_license | CREATE TABLE `[% table_name %]` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
# INDEX hoge_idx(`hoge`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='[% comment %]';
| true |
d640fcaf1de606ffa0ef6dc7f16577786245091b | SQL | RavinduDeshank/ITP-Project | /SQL/itp.sql | UTF-8 | 17,669 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 03, 2020 at 05:43 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
33f0632d891f188993b1b3cb02757ebb0046d1de | SQL | nora-sandler/farmers-bazaar-server | /migrations/001.do.create_farmers_bazaar_table.sql | UTF-8 | 769 | 3.21875 | 3 | [] | no_license | CREATE TABLE users (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
user_name VARCHAR (255) UNIQUE NOT NULL,
password VARCHAR (225) NOT NULL,
farm_name TEXT NOT NULL,
street_address TEXT NOT NULL,
city TEXT NOT NULL,
state TEXT NOT NULL,
zip TEXT NOT NULL
);
CREATE TABLE item... | true |
24f10e81df2f7d9d169cb08841ca9a9f3c7be059 | SQL | vladrus13/ITMO | /Databases/hw-07/scripts/5.4.sql | UTF-8 | 387 | 3.953125 | 4 | [] | no_license | create view StudentDebts as
select ls.StudentId, (
select count(distinct p.CourseId)
from Students s natural join Plan p
where
ls.StudentId = s.StudentId and
not exists (
select distinct m.CourseId
from Marks m
where
s.StudentId = m.StudentId and
... | true |
ce4c65454465e1c866c0689a05da11009aa9e65d | SQL | adelgadillog/adn-backend-ceiba | /microservicio/infraestructura/src/main/resources/sql/detallepedido/listar.sql | UTF-8 | 266 | 3.46875 | 3 | [] | no_license | select pro.id as idproducto,pro.nombre as nombreProducto,pp.cantidad as cantidadPedido,pro.cantidadDisponible as cantidadDisponible,pro.precio as precio
from producto as pro join pedido_producto as pp on pp.idproducto = pro.id
where pp.referenciaPedido = :referencia | true |
9e2f207174bbdab1b7343b648c3dad16b75ce802 | SQL | gizempesen/Database_Project | /Database Report/Stored_Procedures.sql | UTF-8 | 2,983 | 3.828125 | 4 | [
"MIT"
] | permissive | #Procedure 1
create procedure getWebsitesByCountry(in countryName varchar(40))
select websites.website_id, Website, Country_Rank
from websites join website_countries on websites.website_id = website_countries.website_id
where country_id in (select country_id
from countries
w... | true |
5aedc52f333b70eb576544f4fb63f151c54ae376 | SQL | clethbridge/SimpleAmortizationCalculator | /AmortizationCalculator.sql | UTF-8 | 2,959 | 3.984375 | 4 | [] | no_license | WITH LoanTerms AS (
SELECT
[LoanId] = 1,
[Amount] = 258300,
[InterestRate] = 4.125,
[Term] = 360,
[AnnualPaymentCount] = 12
UNION
SELECT
[LoanId] = 2,
[Amount] = 100000,
[InterestRate] = 3.5,
[Term] = 120,
[AnnualPaymentCount] = 12
)
, PerPeriod AS (
SELECT
[LoanId] = LoanId,
[InterestR... | true |
847a371472addebde9c9817e248d3cb0d0e25b23 | SQL | eranschweitzer/LPF | /sql/views.sql | UTF-8 | 16,416 | 3.21875 | 3 | [] | no_license | CREATE TABLE linpf.best AS
WITH tmp as (
(SELECT casename, 'pf' as prop, criteria, min(value) as val FROM linpf.res WHERE prop like 'pf%' and criteria in ('del', 'max', 'avg') GROUP BY casename, criteria )
UNION
(SELECT casename, 'pf' as prop, criteria, max(value) as val FROM linpf.res WHERE prop like 'pf%' and criter... | true |
7d59647a1fad2595309f8121c96e692dae067688 | SQL | phoenix110/work-doc | /浙江省慢病监测系统/record/PROCEDURE/ZJJK_SHJC_YYSHBW_REPORT.sql | UTF-8 | 2,247 | 3.234375 | 3 | [] | no_license | create or replace procedure zjjk_shjc_yyshbw_report(
beginDate in varchar2,--伤害发生时间-开始时间
endDate in varchar2,--伤害发生时间-结束时间
jgdm in varchar2,--机构代码-区县为6位-市为4位-省为33
p_cur out zjjk_report.refcursor,--返回分组后的数据
p_cursum out zjjk_report.refcursor,--返回汇总后的数据
p_codeinfo out zjjk_report.refcursor,--返回伤害性质数据
p_shyy o... | true |
58617421aad103eca91d3a925617e01d39e9852e | SQL | mattvanniekerk/itp303 | /databases/vannieke_final_db.sql | UTF-8 | 4,576 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 03, 2019 at 06:53 AM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
9b5f6b4f9bab20dcae179e29d643978b5143dc33 | SQL | hojinWoo/eduagain | /2. DB & JDBC/day24(4~7)/test2_우호진.sql | UHC | 5,907 | 4.625 | 5 | [] | no_license | -- º - ѽð 60(bangry313@naver.com ̸ )
--1. 'London' ٹϴ ȣ(employee_id), ̸(last_name), ̸(job_title), μ̸(department_name), μġ(city) ȸϽÿ.
-- - ̺ : employees, jobs, departments, locations
SELECT employee_id "ȣ",
last_name "̸",
job_title "̸",
department_name "μ̸",
city ... | true |
ca17a78de757fc980299d20fd25c3c2015c1b7b1 | SQL | iThePhran/studere | /db studere.uy/danifer1_parapru.sql | UTF-8 | 12,178 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 26-06-2020 a las 15:30:39
-- Versión del servidor: 5.6.48-cll-lve
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:0... | true |
f3e7042842b5399b610edf4d44dc15a32a312522 | SQL | LuanChagas/mini_projeto_origamid_springBoot | /backend_spring/app/import.sql | UTF-8 | 844 | 3.359375 | 3 | [] | no_license |
create table IF NOT EXISTS tb_produtos(
id varchar(255),
nome varchar(255),
preco decimal(10,2),
descricao varchar(255),
vendido boolean,
Primary Key(id)
);
create table IF NOT EXISTS tb_fotos(
id int auto_increment not null,
titulo varchar(255),
src var... | true |
88b7744bb32b761310a098754d3bb9b03f835b3d | SQL | paejan/eparlimen | /parlimen.sql | UTF-8 | 130,407 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2020 at 02:57 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
8072c7c9d1178d4007c9cfac86634b752ee36128 | SQL | christiangenco/pictwist | /initialize.sql | UTF-8 | 3,870 | 2.734375 | 3 | [] | no_license | USE pictwist;
insert into
users(email, password_hash, name, city, state, country, bio, admin)
values("cgenco@smu.edu", "genco", "Christian Genco", "New York", "New York", "USA", "Hi. My name is Christian!", 0);
insert into
users(email, password_hash, name, city, state, country, bio, admin)
values("nsliwa@smu.ed... | true |
c70a09be94f5d2fd36a791ee1d95c98b9fd59652 | SQL | mhmtsd/classWork | /odev1.sql | UTF-8 | 336 | 3.0625 | 3 | [] | no_license | select title,description from film
select * from film
where length>60 and length<75
select * from film
where rental_rate=0.99 and
replacement_cost=12.99 or
replacement_cost=28.99
select first_name,last_name from customer
where first_name='Mary'
select * from film
where length<50 and rental_rate !=2.99
or rent... | true |
7cea3116914b59629fe134996532646db55bf8ec | SQL | oradrs/tpt-oracle | /logfile.sql | UTF-8 | 373 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
col logfile_member head MEMBER for a100
select
l.sequence#,
l.group#,
l.thread#,
lf.member logfile_member
from
v$log l,
v$logf... | true |
e3360c04b6d90afea30ebc9e9456f0ca4def58c3 | SQL | scottstanie/scottstanie.github.io | /fb.sql | UTF-8 | 1,028 | 4.5 | 4 | [
"MIT"
] | permissive | -- Average word counts and message lengths
SELECT name,
AVG(msg_length)::INT as avg_msg_length,
AVG(word_count)::INT as avg_word_count
FROM fb_messages
GROUP BY 1
ORDER BY 2 DESC
-- Message count by user and time period
WITH grid AS (
SELECT start_time
, lead(start_time) OVER (ORDER BY start_time) AS end_tim... | true |
b087f74fc2c9df3ce8ee348eaa9bfe527ce0d718 | SQL | ella-hong22/SQL-Developer | /11뷰의 개념과 뷰 사용하기.sql | UHC | 1,134 | 3.75 | 4 | [] | no_license | 11. ϱ (ũ Ҵ )
create or replace view v_emp_sample
as
select eno, ename,job, manager, dno
from employee;
select*from user_views;
select*from v_emp_sample;
ġ .
create or replace view v_emp_salary
as
select dno,
sum(salary) as "",
round(avg(salary),2) as " "
from employee
... | true |
150dd8ee5936932547c375e45d0f7c387ea13d18 | SQL | joekazem/EmployeeManagementSystemHMK12 | /db/seed.sql | UTF-8 | 743 | 2.953125 | 3 | [] | no_license | INSERT INTO departments (department_name)
VALUES ("Sales"), ("Legal"), ("Finance"), ("Engineering");
INSERT INTO roles (title, salary, department_id)
VALUES ("Sales Lead", 100000.00, 1), ("Salesperson", 80000.00, 1), ("Lawyer", 190000.00, 2), ("Legal Team Lead", 250000.00, 2), ("Accountant", 125000.00, 3), ("Software ... | true |
6f313a3b5d616fc26dd0b58f4ef8ef60cdb54606 | SQL | PkMxM/Portfolio | /portfolio_kred.sql | UTF-8 | 3,732 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- ホスト: 127.0.0.1
-- 生成日時: 2020-11-27 10:51:55
-- サーバのバージョン: 10.4.14-MariaDB
-- PHP のバージョン: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
7e118557a3773338eed216873e5b587979ddfc58 | SQL | Warglaive/Database-Basics-MS-SQL-May-2018 | /FirstHomework/DataTypes/18.BasicInsert.sql | UTF-8 | 744 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO Towns([Name])
VALUES
('Sofia'),
('Plovdiv'),
('Varna'),
('Burgas')
INSERT INTO Departments([Name])
VALUES
('Engineering'),
('Sales'),
('Marketing'),
('Software Development'),
('Quality Assurance')
INSERT INTO Employees(FirstName, MiddleName, LastName, JobTitle, HireDate, Salary)
VALUES
('Ivan', 'Ivanov', ... | true |
db8baf7fca92b7c266416b972081f023ec5572ab | SQL | kongyew/gpdb | /gpMgmt/test/behave/mgmt_utils/steps/data/gptransfer/two_level_range_prt_2.sql | UTF-8 | 406 | 3.5625 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"PostgreSQL",
"LicenseRef-scancode-other-copyleft",
"metamail",
"BSD-3-Clause",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-other-permissive",
"ISC",
"Python-2.0",
"bzip2-1.0.6",
"LicenseRef-scancode-ssleay-windows",
"LicenseRef-scanco... | permissive | -- two levels partition table, range(year) and range(month)
DROP TABLE IF EXISTS sales;
CREATE TABLE sales (id int, year int, month int, day int,
region text)
DISTRIBUTED BY (id)
PARTITION BY RANGE (year)
SUBPARTITION BY RANGE (month)
SUBPARTITION TEMPLATE (
START (1) END (3) EVERY (1),
DEFAULT SUBPARTITION oth... | true |
91cccd39748ed90723af4d5b5eacc9052fa5ebf3 | SQL | Lakshmikanth-Paruchuru/Employee-Software-Database | /Employee-Software-Database/Solution/Queries for scenarios.sql | UTF-8 | 1,055 | 3.96875 | 4 | [] | no_license | #Queries
#Scenario1
create view No_Of_installations AS
select sware_pack.SPackName,sware_pack.SPack_ID,count(install_to.SPack_ID)
from install_to,sware_pack
where install_to.SPack_ID=sware_pack.SPack_ID
group by sware_pack.SPack_ID;
#Scenario2
select certified_to.Emp_ID, employee.emp_name
from certified_to
join swa... | true |
3e9c0dab2dabf7b308aed9131533f8b6573477c7 | SQL | M3rty/FaturaIrsaliye | /FaturaveIrsaliyeSistemi/StoredProc/spFaturaEkle.sql | UTF-8 | 559 | 2.609375 | 3 | [] | no_license | Alter PROCEDURE spFaturaKaydet
(
@seri varchar(5),
@fatura_no int,
@musteri varchar(150),
@vergi_d varchar(50),
@vergi_no int,
@tarih varchar(50),
@irsaliye_no int,
@irsaliye_tarih varchar(50),
@barkod int ,
@urun_ad varchar(150),
@miktar int,
@birim varchar(20),
@tutar money,
@durumu int,
@toplam money,
@kdv int,
@ge... | true |
fe59088ad3ce4d233bf1eaff8161812bd849a154 | SQL | abnersiqueira/PagueBem | /PagueBem/Banco de Dados MySQL/sql antigos/Backup Geral.sql | UTF-8 | 3,437 | 3.234375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `paguebembd` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `paguebembd`;
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: paguebembd
-- ------------------------------------------------... | true |
a12e81c2820de80214ef452056ab2f36d6124e2b | SQL | KongHangd/community | /src/main/resources/db/migration/V1__Add_database.sql | UTF-8 | 1,696 | 3.5625 | 4 | [] | no_license | create table USER
(
ID INT auto_increment,
ACCOUNT_ID VARCHAR(100),
NAME VARCHAR(50),
TOKEN CHAR(36),
GMT_CREATE BIGINT,
GMT_MODIFIED BIGINT,
constraint USER_PK
primary key (ID)
);
alter table USER
add bio VARCHAR(256);
create table question
(
id int auto_increment,
title... | true |
736d478d5236d56c005021afe269e58cb7317407 | SQL | RTAndrew/project-cef | /SQL.sql | UTF-8 | 37,733 | 3.8125 | 4 | [] | no_license | <? php
--AULA DE BASE DE DADOS
-- SELECT aluno.Id_Aluno, aluno.Nome_Aluno, turma.Id_Turma, turma.Nome_Turma
-- FROM aluno
-- INNER JOIN turma ON (turma.Id_Turma = aluno.Id_Turma)
-- WHERE turma.Id_Turma = 1
-- SELECT cliente.Nomec, extract(Month from date(data))
-- from pedido
-- INNER JOIN... | true |
42a9270e731e40c4a8ba5301afc954a1a1534b41 | SQL | jinjing2013/bidata | /bidata/sql/.sql | UTF-8 | 3,194 | 3.5625 | 4 | [] | no_license | -- 27_ft_ft_18_personscore_sales
/*建表
use ufdata;
drop table if exists ufdata.cx_person_position;
create table if not exists ufdata.x_person_position(
year_ smallint comment '年份',
quarter_ smallint comment '季度',
person_name varchar(20) comment '姓名',
position_name_ad varchar(40) comment '职位_手动维护',
ke... | true |
ab16815fedc22c50529841e89235d060fad1bff6 | SQL | ARWA-ALraddadi/sql_Tutorial | /game_collection_practice_Tutorial.sql | UTF-8 | 1,910 | 4.375 | 4 | [] | no_license |
USE game_collection_pe;
# Question 1
/* Write a query to list the title, year and RRP (Recommended Retail Price)
of every game that is an adventure game and was developed by LucasArts */
SELECT title, year, RRP
FROM games
WHERE genre = 'Adventure' AND developer = 'LucasArts';
# Question 2
/* Write a query to l... | true |
297d3f7365c6d32cc9293329773372662fc5f638 | SQL | Silmar/Siscom | /sql/siscomjava.sql | ISO-8859-1 | 26,468 | 3.453125 | 3 | [] | no_license | /*==============================================================*/
/* Database name: SISCOMJAVA */
/* DBMS name: MySQL 5.0 */
/* Created on: 22/07/2013 23:56:23 */
/*==================================================... | true |
01918cc60c7d7e1408646db4d1b9bad145df0ec4 | SQL | abbas886/ActivityStream | /schema/activity_stream_db_user_circle.sql | UTF-8 | 2,255 | 2.71875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: activity_stream_db
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
f6eb2ace3ceb42ac9afff84a7f39edbeff34fbdf | SQL | xhispams/Desafio_operaciones_en_una_tabla | /operaciones_tabla.sql | UTF-8 | 3,798 | 4.125 | 4 | [] | no_license | --PARTE 1
-- 1. Crear Base de datos posts
CREATE DATABASE posts;
-- 2. Crear tabla post, con los atributos id, nombre de usuario, fecha de creación, contenido, descripción.
CREATE TABLE post(id SERIAL PRIMARY KEY, nombre_de_usuario VARCHAR(70), fecha_de_creacion DATE, contenido VARCHAR(100), descripcion VARCHAR(300)... | true |
fe2168f8770cdf5aebc641abb61dd23d69529576 | SQL | echobind/bisonapp-nextauth | /prisma/migrations/20210812152151_nextauth/migration.sql | UTF-8 | 2,417 | 3.921875 | 4 | [] | no_license | /*
Warnings:
- You are about to drop the column `password` on the `User` table. All the data in the column will be lost.
- You are about to drop the `Profile` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "Profile" DROP CONSTRAINT "Profile_userId_fkey"... | true |
39c97a2ba15e4e46a2815626fe3ed2a261dfb759 | SQL | imavishek/StairSupplies | /db/2018-07-25 - add SalesSupport employee to orders.sql | UTF-8 | 5,007 | 3.65625 | 4 | [] | no_license | -- Rename Salesman to Sales
ALTER TABLE `TblOrdersBOM`
DROP FOREIGN KEY `FK_TblOrdersBOM_SalesmanEmployeeID`;
ALTER TABLE `TblOrdersBOM`
CHANGE COLUMN `SalesmanEmployeeID` `SalesEmployeeID` INT(10) NULL DEFAULT NULL AFTER `EnteredByEmployeeID`,
DROP INDEX `idxFK_SalesmanEmployeeID`,
ADD INDEX `idxFK_SalesEmployeeI... | true |
30ae2348fe16e460562f9be3c193cc69891fb78b | SQL | rileyharrison/prime-solo-sql | /solution.sql | UTF-8 | 965 | 3.25 | 3 | [] | no_license | --question 1:
SELECT * FROM syntax_practice WHERE city = 'chicago';
--question 2:
SELECT * FROM syntax_practice WHERE username LIKE '%a%';
--question 3:
UPDATE syntax_practice SET account_balance = '10.00' WHERE transactions_completed = '0' AND account_balance = '0';
--question 4:
SELECT * FROM syntax_pract... | true |
9fc38c758b2259af5667e36cc56b7643ea939778 | SQL | monsterkillzla/test | /testtask.sql | UTF-8 | 6,192 | 3.09375 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: testtask
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
ae491d5d0e055cc2da4c21158b56d306fbbf10eb | SQL | jbellmann/mint-storage | /resources/db/migration/V1__Basic_schema.sql | UTF-8 | 976 | 3.78125 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | CREATE SCHEMA zm_data;
SET search_path TO zm_data;
CREATE TABLE application (
a_id TEXT NOT NULL PRIMARY KEY,
a_redirect_url TEXT,
a_username TEXT NOT NULL,
a_client_id TEXT,
a_last_password_rotation TIMESTAMPTZ,
a_last_client_rotati... | true |
c97e90c46d184ac726bfd6965493479df2137c13 | SQL | OreKar/Texnologies-Diadiktyou---2018 | /ΤΕΧΝΟΛΟΓΙΕΣ ΔΙΑΔΙΚΤΥΟΥ/Kratiseis.sql | UTF-8 | 741 | 2.8125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `ekdromes` DEFAULT CHARACTER SET greek COLLATE greek_general_ci;
USE `ekdromes`;
DROP TABLE IF EXISTS `kratiseis`;
CREATE TABLE IF NOT EXISTS `kratiseis` (
`Ονοματεπώνυμο` varchar(30),
`EMAIL` varchar(30) ,
`Προορισμός` varchar(50) ,
`Άφιξη` Date ,
`Αναχώρηση` Date ,
... | true |
ed773cea67bc1249d888396afc9eaea6f7f35b63 | SQL | ahmadrizalsunaedi/Aplikasi-Pembayaran-Berbasis-PHP | /payment.sql | UTF-8 | 19,518 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Feb 2020 pada 02.27
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 5.6.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
9151f1e631a049568a34f9eaf9bf99835295a406 | SQL | kobrikov/Task-Manager | /schema.sql | UTF-8 | 996 | 3.625 | 4 | [] | no_license | CREATE DATABASE taskmanager
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE taskmanager;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
u_reg DATETIME,
u_email VARCHAR(64),
u_name VARCHAR(128),
u_password VARCHAR(64)
) ENGINE=InnoDB DEFAU... | true |
260439f4be1eaba78b159853e7e0317c84a5dc22 | SQL | nonkronk/cs50x-harvard-university | /pset7/movies/11.sql | UTF-8 | 441 | 4.125 | 4 | [] | no_license | -- write a SQL query to list the titles of the five highest rated movies (in order) that Chadwick Boseman starred in, starting with the highest rated.
SELECT t2.title
FROM (SELECT movie_id, rating
FROM ratings
WHERE movie_id IN (SELECT movie_id
FROM stars
WHERE person_id IN (SELECT id
FROM people
... | true |
5913dce689b30005e146fe2140f3e21f32348fcd | SQL | UCASV/proyecto-final-grupo_46 | /Base de Datos/DBCreate.sql | ISO-8859-1 | 12,012 | 3.328125 | 3 | [] | no_license | CREATE DATABASE Vaccination_Program;
USE Vaccination_Program;
SET LANGUAGE us_english;
------------------------------------
CREATE TABLE DIRECCION_CIUDADANO(
id INT PRIMARY KEY IDENTITY,
colonia VARCHAR(40),
calle VARCHAR(40) NOT NULL,
no_casa INT NOT NULL,
municipio VARCHAR(24) NOT NULL,
departamento VARCHAR(1... | true |
640d08abdb21eafe01ad27864af0454df2e7319f | SQL | 314863336/jeemes-base | /web/src/db/jeemes_system_mysql.sql | UTF-8 | 48,275 | 3.28125 | 3 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : 150
Source Server Type : MySQL
Source Server Version : 50717
Source Host : 168.168.8.150:3306
Source Schema : jeemes
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : 65001
Date: 30/... | true |
5036dcdc841329daaaffee856cf7c1c8c7e49974 | SQL | BackupTheBerlios/swms | /swms/db/stored_procedures/user_login.sql | UTF-8 | 966 | 3.375 | 3 | [] | no_license | /***************************************************************************
* procedure user_login
* DESCRIPTION:
* checks a user_name/password combination for login
*
* PARAMETER:
* i_auser_name user_name to check
* i_password password to check
*
* RETURNS:
* the user_id of the give... | true |
a047e69dc6217f92cd299bea30bcc8fc50517b38 | SQL | villageworks-tutor/employeedb | /_docs/db/SQL/mysql/01_create_db.sql | UTF-8 | 303 | 2.515625 | 3 | [] | no_license | -- MySQL/MariaDB対応データベース作成・ユーザ作成スクリプト
DROP DATABASE IF EXISTS employeedb;
DROP USER IF EXISTS employeedb_admin;
CREATE DATABASE employeedb character SET utf8;
GRANT ALL PRIVILEGES ON employeedb.* to 'employeedb_admin'@'localhost' IDENTIFIED BY 'admin123';
| true |
0e016e7c65eb3c0d7c61dae87d174218c30549fc | SQL | jacobrobertson/banyan | /banyan-domain/src/main/resources/sql/create-examples.sql | UTF-8 | 3,281 | 3.109375 | 3 | [] | no_license | delete from example_group;
-- ! means not pinned
-- $ means the image shown in the example page (only one can be shown)
insert into example_group
(index, group_id, caption)
values
(0, 1, 'Explore these trees'),
(1, 3, 'Have your heard of these?'),
(2, 4, 'Can you guess which is more closely related...'),
(3, 2, 'Some... | true |
aec8b3c691ddd44bb91654fbeeaf060fdc74d15c | SQL | IsmaelF01/practicaServidor | /Tema 5/clase/empleados/2daw.sql | ISO-8859-1 | 2,722 | 2.671875 | 3 | [] | no_license | -- MariaDB dump 10.17 Distrib 10.4.14-MariaDB, for Win64 (AMD64)
--
-- Host: localhost Database: 2daw
-- ------------------------------------------------------
-- Server version 10.4.14-MariaDB
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@U... | true |
9fb027fada7e2eae3f537bd99e8463c485eff28f | SQL | AlexanderMikhel/BioLab | /out/production/resources/db/migration/V20171224001328109__add_experiment_api_db.sql | UTF-8 | 2,740 | 4.3125 | 4 | [] | no_license | create table IF NOT EXISTS spectra_data
(
id serial not null
constraint spectra_pkey
primary key,
spectra VARCHAR,
name VARCHAR,
profile_id INTEGER,
created_at timestamp default now(),
updated_at timestamp,
deleted_at timestamp,
CONSTRAINT fk_spectra_data_to_profiles FOREIGN KEY (profile_id)
R... | true |
dbeae502344625c19ea86e70ef3083110e5bd91d | SQL | singhsimar0721/server-applicant-test-21 | /src/main/resources/data.sql | UTF-8 | 2,646 | 3.125 | 3 | [] | no_license | /**
* CREATE Script for init of DB
*/
-- Create 3 OFFLINE drivers
insert into driver (id, date_created, deleted, online_status, password, username) values (1, now(), false, 'OFFLINE',
'driver01pw', 'driver01');
insert into driver (id, date_created, deleted, online_status, password, username) values (2, now(), fals... | true |
d0f5653fea8e4b0944360d122febf9de106800eb | SQL | yuuuko-1106/sento | /sql/sento_master.sql | UTF-8 | 11,600 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.18
-- https://www.phpmyadmin.net
--
-- ホスト: mysql143.phy.lolipop.lan
-- 生成日時: 2020 年 7 月 09 日 10:45
-- サーバのバージョン: 5.6.23-log
-- PHP のバージョン: 5.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9defdd4a059da051a4a90bd1ede73fab5bd99665 | SQL | T-Priyanka06/YoYo-Pizza-App | /PHP and MySQL/unistamgroups_yoyopizza.sql | UTF-8 | 1,269 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 24, 2020 at 11:35 PM
-- Server version: 10.3.24-MariaDB-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
2d972b1753e1d3827bb69801b139b8040795a136 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day17/select2107.sql | UTF-8 | 191 | 2.78125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-16T21:07:00Z' AND timestamp<'2017-11-17T21:07:00Z' AND SENSOR_ID='f969cf99_17f9_4428_b8fb_6665586f89be'
| true |
f8e1ae0ae89bf5e3320d6a65347341ae274a1453 | SQL | Rushikesh0020/SQL-Learning | /The_Power_of_Logical_Operators/logical_or.sql | UTF-8 | 3,576 | 3.5625 | 4 | [] | no_license | SELECT * FROM books
WHERE author_lname = 'Eggers' || released_year > 2010;
-- OR
SELECT * FROM books
WHERE author_lname = 'Eggers' OR released_year > 2010;
+---------+-------------------------------------------+--------------+--------------+---------------+----------------+-------+
| book_id | title ... | true |
3a385c15d9fd86ae3d3834ee361be921102aa9db | SQL | ciphersbak/psftpp | /SQLs/FindFieldDefinitionReferences.sql | UTF-8 | 2,279 | 2.65625 | 3 | [] | no_license | set pages 50000 lines 32767;
set verify off
set trimspool on;
set trimout on;
set sqlformat csv;
--set sqlformat ansiconsole;
--set termout off;
def FIELDNAME = ('EMPLID')
SELECT DISTINCT 'Used_in_CUBES', ACEMODELID FROM PSACECUBECOLMAP WHERE FIELDNAME IN &FIELDNAME OR ACEAGGRFIELDNAME IN &FIELDNAME ORDER BY ACEMODEL... | true |
90aa5669302435653994e34e4837fe5f99c6dba9 | SQL | thrsky/MonitoringDistributed-Sys | /src/main/resources/schema/WarnMessage.sql | UTF-8 | 278 | 2.65625 | 3 | [] | no_license | CREATE TABLE warn_message(
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(200) NOT NULL COMMENT '标题',
warn_line DOUBLE NOT NULL COMMENT '警戒线',
`type` int NOT NULL COMMENT '大于:1 等于:0 小于:-1',
item VARCHAR(20) COMMENT 'cpu,mem,disk,net...'
) | true |
6e2546a48382c6f314c28ea833897cdf4c64dc78 | SQL | SeekMentore/SeekMentore | /src/database/mysql/changes/2018-05-10-00-30.sql | UTF-8 | 708 | 2.71875 | 3 | [] | no_license | USE SEEK_MENTORE;
CREATE TABLE TUTOR_RESTRICTED_COLUMN_CHANGES(
CHANGE_ID INT NOT NULL AUTO_INCREMENT,
TUTOR_ID INT NOT NULL,
COLUMN_CHANGED VARCHAR(100) NOT NULL,
COLUMN_TYPE VARCHAR(100) NOT NULL,
OLD_VALUE_VARCHAR VARCHAR(1000),
NEW_VALUE_VARCHAR VARCHAR(1000),
OLD_VALUE_DATE VARCHAR(1000),
NEW_VALUE_DATE VARCHAR(1... | true |
fe3aad043cd8e65714d8c5d7635dcfc58d3616d3 | SQL | katudyu/ateam | /database/database.sqlite.sql | UTF-8 | 71,754 | 3.296875 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "migrations" (
"id" integer NOT NULL,
"migration" varchar NOT NULL,
"batch" integer NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "sessions" (
"id" varchar NOT NULL,
"user_id" integer,
"ip_address" varchar,
"user_agent" text,
"payload" tex... | true |
7417bc23f848f9ef4056e87c61a2d3426df3f2a5 | SQL | ataube/clean-architecture | /migrations/schema.sql | UTF-8 | 693 | 3.25 | 3 | [] | no_license | CREATE SEQUENCE product_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE product (
id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('product_seq'::regclass),
sku varchar(30) NOT NULL,
brand varchar(255) NOT NULL,
description text NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEF... | true |
e5d03aabd439b47c9d4f17e213d733e01c755267 | SQL | Bueno-Italo/MySQL-Workbench | /Curso MySQL #05 - SELECT (Parte 2).sql | UTF-8 | 1,577 | 4 | 4 | [
"MIT"
] | permissive | USE cadastro;
/* LIKE comando para filtrar semelhança entre os dados ou pesquisa desejada*/
SELECT * FROM cursos WHERE nome LIKE 'P%';
/*WILDCARDS PORCENTAGEM PRIMEIRO DA LETRA (%A) SIGNIFICA RESULT SET QUE SE PAREÇA E TERMINE COM A LETRA A (ULTIMA LETRA)*/
SELECT * FROM cursos WHERE nome LIKE '%A';
/* %A% SELECION... | true |
a9d4cd98edac0b12d64ee1702c45bf500d350a82 | SQL | fabiomigliorini/MGdb | /SQLs/Verao - Importacao Tabela Legado.sql | UTF-8 | 8,488 | 3.671875 | 4 | [] | no_license | drop table tblcompraverao;
create table tblcompraverao as
select
npb.codnegocioprodutobarra,
npb.codprodutobarra,
nat.naturezaoperacao,
nat.codoperacao,
p.codproduto,
p.produto,
coalesce(pb.referencia, pv.referencia, p.referencia) as referencia,
pb.barras,
m.marca,
coalesce(pe.preco, p.preco * coalesce(pe.... | true |
6a953e59b59d68003afc7a66f6cd775e4426437d | SQL | folio-org/mod-invoice-storage | /src/main/resources/templates/db_scripts/data-migration/populate_vendor_id_to_voucher.sql | UTF-8 | 314 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | UPDATE ${myuniversity}_${mymodule}.vouchers as vouchers
SET jsonb = vouchers.jsonb ||
(
SELECT jsonb_build_object('vendorId', invoices.jsonb->>'vendorId')
FROM ${myuniversity}_${mymodule}.invoices as invoices
WHERE vouchers.invoiceId = invoices.id
)
WHERE NOT vouchers.jsonb ? 'vendorId'; | true |
d1826712cb0f082faf427d0ff6bf1d8c78cd3514 | SQL | JonLinC07/GSM-Lin | /Private/Script_BD.sql | UTF-8 | 1,793 | 3.296875 | 3 | [] | no_license | CREATE DATABASES IF NOT EXISTS DB_gsmlin;
USE DB_gsmlin;
DROP TABLE IF EXISTS Users;
CREATE TABLE IF NOT EXISTS Users (
ID_user INT(11) NOT NULL AUTO_INCREMENT,
User_name VARCHAR(255) NOT NULL,
Nick_name VARCHAR(255) NOT NULL,
Password VARCHAR(255) NOT NULL,
Image VARCHAR(255) NOT NULL,
PRIMARY KEY (ID_use... | true |
714b161ec37b5277293e500b0c7df7e19875ce5d | SQL | neem693/LastProject | /last_baseball_project/sql/occupy.sql | WINDOWS-1252 | 1,645 | 3.125 | 3 | [] | no_license | create table occupy
(
o_idx int unsigned auto_increment,
o_secondQ int(1) not null,
t_name varchar(30) not null,
s_idx int unsigned,
constraint pk_occupy_idx primary key(o_idx),
constraint fk_occupy_t_name foreign key(t_name)
references team(t_name) on update cascade,
constraint fk_occupy_s_idx foreign key(s_id... | true |
5cf1d053cb5eac5700fa69d7cc4ed6f953826aca | SQL | markus1978/SNBPCRMS | /conf/evolutions/default/1.sql | UTF-8 | 3,072 | 3.59375 | 4 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table action (
id bigint not null,
service integer,
action_type integer,
direction integer,
message ... | true |
e02d11a6fa0d7b383a62eedc0e81431eaf7bdaa6 | SQL | Braiunito/contactapp | /bd/contacts.sql | UTF-8 | 1,717 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 10-06-2019 a las 22:47:09
-- Versión del servidor: 10.3.15-MariaDB
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... | true |
fbdcabd68835ddbdbde94bd9f0b7477c6420309d | SQL | Viiic98/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/12-no_genre.sql | UTF-8 | 291 | 3.75 | 4 | [] | no_license | -- Display shows
-- Only the shows that doesnt have a genre linked
SELECT tv_shows.title, tv_show_genres.genre_id
FROM tv_shows
LEFT JOIN tv_show_genres
ON tv_show_genres.show_id = tv_shows.id
WHERE tv_show_genres.genre_id IS NULL
ORDER BY tv_shows.title, tv_show_genres.genre_id ASC;
| true |
15b27f8447f6e03d6903532b278ada9df06232c5 | SQL | Stenca/Idologis | /dump.sql | UTF-8 | 6,485 | 2.9375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.59, for debian-linux-gnu (i686)
--
-- Host: localhost Database: idologis
-- ------------------------------------------------------
-- Server version 5.5.59-0+deb7u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
860e9441ac547cba0a53e45f7da66f129c415e09 | SQL | badday2604/PHPProject1 | /BookStoreInventory.sql | UTF-8 | 2,658 | 3.46875 | 3 | [] | no_license | USE bookstore;
select * from books;
truncate table books;
insert into books
(name, description, author, unit_price, quantity)
values
("War and Peace",
"A legendary masterpiece, this book is synonymous with difficult reading, so why not challenge yourshelf.",
"Leo Tolstoy",
21.00,
9),
("Song of Solomon",
"One must... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.