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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
45ab50a839e32200f016add8da7b7ae649f9bbcf | SQL | ec-team/optik | /database/kasir_20190921.sql | UTF-8 | 27,533 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 21, 2019 at 10:07 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
1e49ea8dd866ed7faa10a6229c3d1ae95934eb0a | SQL | eladioruiz/golf | /db/migrate/create_profiles.sql | UTF-8 | 1,428 | 2.953125 | 3 | [] | no_license | /*CREATE TABLE `profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` int(11) DEFAULT NULL,
`enabled` tinyint(1) DEFAULT '1',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
*/
CREATE TABLE `rights`... | true |
f847d80d8c67dd29e5310e752d2067c789fc1fdb | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day24/select2142.sql | UTF-8 | 263 | 2.9375 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['3221','2058','3100_10','2084','4216','3216','5058','5056','3099','5044'])
| true |
cc255ecf893515be60c86856696d55a3ea1c2ebe | SQL | rahach/sql | /exercises/lab_07_04.sql | UTF-8 | 254 | 2.921875 | 3 | [] | no_license | -- 4
SELECT e1.last_name "Employee", e1.employee_id "EMP#", e2.last_name "Manager", e2.employee_id "MGR#"
FROM employees e1
JOIN employees e2
ON e1.manager_id = e2.employee_id;
| true |
e4cc0105afc59eef2541ab263daff34a3aa8747a | SQL | siekanski/Bookstore | /Bookstore/Bookstore.sql | UTF-8 | 545 | 2.90625 | 3 | [] | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: siekan
* Created: 2017-02-25
*/
CREATE TABLE IF NOT EXISTS Books (
id int(11) NOT NULL AUTO_INCREMENT,
name var... | true |
727321c0ab3f4fd62979a785603af017278ce4b8 | SQL | salgilbarana/Tddoline | /ddonline/app-RestfulServer/installers/sql/dbLog.sql | UTF-8 | 4,387 | 3.125 | 3 | [] | no_license | -- --------------------------------------------------------
--
-- 테이블 구조 `payments`
--
CREATE TABLE `payments` (
`srl` bigint(20) UNSIGNED NOT NULL COMMENT 'srl',
`userSrl` bigint(20) UNSIGNED NOT NULL DEFAULT '0' COMMENT '유저 srl',
`isProc` tinyint(1) NOT NULL DEFAULT '0' COMMENT '성공 여부',
`platformType` tinyi... | true |
b9598bf99ab7fddda0fae67a594adb00adc540f3 | SQL | cuongphung6886/nhom2.github.io | /television.sql | UTF-8 | 2,490 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th2 26, 2020 lúc 09:16 AM
-- Phiên bản máy phục vụ: 10.3.15-MariaDB
-- Phiên bản PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
aeda07ce7cf426eb818bd24b5103d31b30ede541 | SQL | StEfo5/Polyhedron | /Company1 (1).sql | UTF-8 | 4,022 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Ноя 01 2020 г., 08:16
-- Версия сервера: 5.6.38
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
8196bd00214d714b15d9acb78535f75c7c90aaf5 | SQL | superyaz/nodejs-mysql-app | /database/db.sql | UTF-8 | 728 | 3.859375 | 4 | [
"MIT"
] | permissive | --CREATE DATABASE
CREATE DATABASE database_links;
USE database_links;
--USERS TABLE
CREATE TABLE users
(
id INT(11) PRIMARY KEY NOT NULL
AUTO_INCREMENT, AUTO_INCREMENT = 2,
username VARCHAR
(16) NOT NULL,
password VARCHAR
(60) NOT NULL,
fullname VARCHAR
(100) NOT NULL
);
--LINK... | true |
0e1afade881cd72b91fb433bee7576fb5e3af8c8 | SQL | fnaseeha/Spiring1 | /spring-database/src/main/resources/data.sql | UTF-8 | 426 | 2.828125 | 3 | [] | no_license | --create table person
--(
-- id integer not null,
-- name varchar(100),
-- location varchar(100),
-- birth_date timestamp,
-- primary key(id)
--);
INSERT INTO PERSON(ID,NAME,LOCATION,BIRTH_DATE)
VALUES (20001,'Nasee','Colombo',sysdate());
INSERT INTO PERSON(ID,NAME,LOCATION,BIRTH_DATE)
VALUES (20002,'Ilhama','Kandy',... | true |
774f51f535595c4f2efb49d5519e9a8c0d48b0b0 | SQL | Aziskomara/Tugas-UAS-Praktikum-Basis-Data-2 | /10118029_Akademik.sql | UTF-8 | 4,178 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 19 Agu 2020 pada 14.04
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
24c921318c65462adcee47bfc590329c5e5d1fcb | SQL | MuriloGon/trybe-exercises | /exercises/03.backend/block21-sql_functions-joins-and-subqueries/day3-stored-procedures-and-stored-functions/02-fixation-stored-functions.sql | UTF-8 | 1,468 | 4.3125 | 4 | [] | no_license | -- 01 - Utilizando a tabela sakila.payment , monte uma function que retorna a quantidade total de pagamentos feitos até o momento por um determinado customer_id .
USE sakila;
DELIMITER $$
CREATE FUNCTION TotalPaymentsByCustomerId(id INT)
RETURNS NUMERIC READS SQL DATA
BEGIN
DECLARE payment_quantity NUMERIC;
SELECT ... | true |
5eaf58338129f05c96893bd5ec4f8bfa25f737e6 | SQL | TolearSav/turma18G | /MySQL/Exercícios/Exercicio1RH.sql | UTF-8 | 911 | 3.34375 | 3 | [] | no_license | CREATE DATABASE db_Exercicio1RH;
USE db_Exercicio1RH;
CREATE TABLE tb_funcionarios(
id bigint auto_increment,
nome varchar(255) not null,
idade int not null,
funcao varchar(255) not null,
salario float not null,
primary key(id)
);
insert into tb_funcionarios (nome, idade, funcao, salario) values ("Jorge",28, "Consul... | true |
70f4b93454bdb0f0ab0b1490bb6a9b2028f40e52 | SQL | lienero/mySql | /0824/p1.sql | UTF-8 | 4,752 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- 생성 시간: 20-08-24 09:25
-- 서버 버전: 10.4.13-MariaDB
-- PHP 버전: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... | true |
e1640f65830c086c57cfa687e0bf62774fe8ecbd | SQL | shreyade/Online-Store | /procedured.sql | UTF-8 | 1,598 | 4.15625 | 4 | [] | no_license | /* write a plsql function that takes an orderid, computes the total for that order and returns the total.
The function should consider the customer type, tax, shipping fee etc to compute the total */
/* is the order ID an integer? */
Create or Replace Function computeTotal2(orderID in Integer)
RETURN NUMBER IS
... | true |
2bb292f2a07a70c5370907f7fc89fa837334e745 | SQL | ShuperPee/PD_TP | /Init_DataBase.sql | UTF-8 | 2,723 | 3.4375 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
03965dc201e46d37807463b7a7d02041c6ef8608 | SQL | radtek/abs3 | /sql/mmfo/nbu_gateway/View/V_CORE_FINPERFORMANCEGR_UO.sql | UTF-8 | 1,333 | 3.125 | 3 | [] | no_license | PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/NBU_GATEWAY/View/V_CORE_FINPERFORMANCEGR_UO.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** Cre... | true |
529600f02cd84b240fa7fa9474a69d43a406f9ce | SQL | werlleymendes/consultas_migracao_vr_consinco | /Contas_a_pagar.sql | UTF-8 | 10,756 | 3.234375 | 3 | [] | no_license | /*CONSULTA PARA MIGRAÇÃO DO BANCO DE DADOS DO VR PARA O C5*/
/*CONTAS A PAGAR*/
SELECT * FROM view_contasapagar;
CREATE VIEW view_contasapagar as
/*CONSULTA UTILIZADA PARA FAZER INSERT NA TABELA Tabela FI_IntTitulo*/
SELECT
null as "SeqIntTitulo", 1 as "TipoRegistro", 1 as "NroEmpresaMae",
--A nossa loja 4 no VR ser... | true |
fba2e2d10d6f2f2d2e3eb5809fac441b0f6e89b5 | SQL | HuyAnh/huyanh0788 | /spring-boot-tutorial/mozart/src/main/resources/etl/sql/campaign_dim_chunk.sql | UTF-8 | 820 | 4.03125 | 4 | [] | no_license | WITH mozart_batch_information AS (
SELECT
st.info AS start_time,
et.info AS end_time
FROM
(SELECT COALESCE(mt.info, '2015-01-01') AS info FROM dwh_staging.mozart_transformation mt WHERE name = 'start_time') st
JOIN
(SELECT info FROM dwh_staging.mozart_transformation WHERE... | true |
46c0a1c405d1e7055629f6525f64340e9aa0896d | SQL | nationminu/spider | /src/main/resources/database/data.sql | UTF-8 | 438 | 3.53125 | 4 | [] | no_license | create table sites (
id varchar(255) not null,
title varchar(255),
url varchar(255),
primary key (id)
) ENGINE=InnoDB CHARSET=utf8;
create table locations (
id varchar(255) not null,
location tinytext(),
siteid varchar(255),
ositeid varchar(255),
version datetime(6),
primary key (id)
) EN... | true |
d9e2d8b8f75963e4c97e0e9f2f8940614fe9ec5b | SQL | batego/db_fintra | /selectrik/opav/Tables/opav.sl_estados_etapas_ofertas.sql | UTF-8 | 937 | 3.28125 | 3 | [] | no_license | -- Table: opav.sl_estados_etapas_ofertas
-- DROP TABLE opav.sl_estados_etapas_ofertas;
CREATE TABLE opav.sl_estados_etapas_ofertas
(
id serial NOT NULL,
reg_status character varying(1) NOT NULL DEFAULT ''::character varying,
dstrct character varying(4) NOT NULL DEFAULT 'FINV'::character varying,
id_e... | true |
ea5fb4012e4a90be6a13ee84a09621c6b9dc522a | SQL | Tjccs/Phyton-Scripts | /schema.sql | UTF-8 | 967 | 3.703125 | 4 | [] | no_license | PRAGMA foreign_keys = ON;
CREATE TABLE utilizadores (
id INTEGER PRIMARY KEY,
nome TEXT,
username TEXT,
password TEXT
);
CREATE TABLE albuns (
id INTEGER PRIMARY KEY,
id_banda INTEGER,
nome TEXT,
ano_album INTEG... | true |
ac262f614c7160fe6e5b2f21b0232b81cfe8aa7b | SQL | vbushuev/it24 | /config/db/tables/catalogs.sql | UTF-8 | 1,583 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 13, 2017 at 07:17 AM
-- Server version: 5.6.30
-- PHP Version: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
e4c88d0cc37904fd5cd306cfa8af2981a48e54e7 | SQL | Godwinaini/seller | /seller.sql | UTF-8 | 12,099 | 2.921875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : demo
Source Server Type : MySQL
Source Server Version : 50731
Source Host : localhost:3306
Source Schema : seller
Target Server Type : MySQL
Target Server Version : 50731
File Encoding : 65001
Date: 15/03/2021 16:53:03... | true |
ee9c94cae01ee9a38c20f286d6c90e836ba9423c | SQL | maxiaoxiaoxiao/FinancialSystem | /src/main/resources/SQL/change_money.sql | UTF-8 | 3,649 | 3.25 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : yuncang
Source Server Type : MySQL
Source Server Version : 50620
Source Host : 12.168.3.75:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50620
File Encoding : 65001
Date: 18/04/2021 13:03... | true |
e878eed3d32eabede3c2139801810aad9bcea75c | SQL | NiloJaticoII/STADVDB_S13.5_T120-21 | /queries/sql_files/queryideas_creditcards.sql | UTF-8 | 2,136 | 4.40625 | 4 | [] | no_license | -- The queries here is only a sample. You may alter some lines to merge them into the controller folder.
-- Made by Nilo Cantil II Jatico
-- One Table
-- 1. List the names of clients, age and marital status based on age.
SELECT client_name, age, marital_status
FROM CLIENTS
WHERE age < 30;
-- 2. Li... | true |
76a34c02aca64f34f872ef9b8625ea0e55408720 | SQL | jiji87432/his-master | /jims-domain/src/main/resources/db.migration/V05__add_report_server_config.sql | UTF-8 | 1,094 | 3.484375 | 3 | [] | no_license | -- Create table
create table REPORT_SERVER_CONFIG
(
ID VARCHAR2(64) not null,
HOSPITAL_ID VARCHAR2(64),
IP VARCHAR2(100),
PORT VARCHAR2(10),
REMOTE_IP VARCHAR2(100),
REMOTE_PORT VARCHAR2(10),
HOSPITAL_NAME VARCHAR2(100)
)
tablespace USERS
pctfree 10
initrans 1
... | true |
c3085be3b36861a9db5a4720b7df7debdd35aaa8 | SQL | husaindalal/spring-async | /src/main/resources/spring_ddl.sql | UTF-8 | 15,074 | 3.09375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.6.21-log - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.1.0.4867
-- --------------------------------------------------------... | true |
ef7bfe6f3adda097d7b90da4f3cf27a939fbc1cb | SQL | gladiopeace/digital-data-syn | /documents/oms/TB_SUPAR.sql | GB18030 | 3,029 | 3.3125 | 3 | [] | no_license | /*
================================================================================
ṹ:TB_SUPAR
ṹ:սЭ鵥
ṹĿ:
================================================================================
*/
drop sequence SEQ_TB_SUPAR;
drop index AK_TB_SUPAR;
drop table TB_SUPAR;
create table TB_SUPAR (
SUPAR_ID INTEGER ... | true |
98057343dcd741dae375579bc90f6a4f010083f8 | SQL | 0Mission0/SQL | /Template/SubstitutionVariables.sql | UTF-8 | 475 | 2.53125 | 3 | [] | no_license | SET SERVEROUTPUT ON;
BEGIN
-- DBMS_OUTPUT.PUT_LINE('天線寶寶說你好,'|| '&&v_hello'); If use &&, then you only need input once
DBMS_OUTPUT.PUT_LINE('天線寶寶說你好,'|| '&v_hello');
DBMS_OUTPUT.PUT_LINE('天線寶寶說你好,'|| '&v_hello');
DBMS_OUTPUT.PUT_LINE('天線寶寶說你好,'|| '&v_hello');
END;
SET SERVEROUTPUT ON;
DECLARE
v_Name&&Anima... | true |
c7c9e9c54db0d26f0fd2959f10301c1cb7d1fabc | SQL | dengquan/EasyScheduler | /kerberos/sql/escheduler_ddl.sql | UTF-8 | 40,106 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: 10.19.248.200 Database: escheduler
-- ------------------------------------------------------
-- Server version 5.7.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
b90ec1cf2de32d319ead5d192697d88d7b1fe274 | SQL | SBelusky/Shop | /shop/src/test/resources/schema.sql | UTF-8 | 852 | 3.40625 | 3 | [] | no_license | -- schema.sql je prvé miesto kam H2 DB pozrie pre vybudovanie štruktúry
DROP TABLE IF EXISTS customer;
CREATE TABLE customer (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(45) NOT NULL,
surname varchar(45) NOT NULL,
email varchar(45) NOT NULL,
address varchar(45) NOT NULL,
age int(11) DEFA... | true |
4aebcf34f855e368c8e780f66eb0bd3fb7eaf3c4 | SQL | ChinaWim/Learning-Notebook | /src/main/java/算法/leetcode/database/hard/Leetcode185.sql | UTF-8 | 2,056 | 4.0625 | 4 | [] | no_license | /**
* [部门工资前三高的所有员工]
Employee 表包含所有员工信息,每个员工有其对应的工号 Id,姓名 Name,工资 Salary 和部门编号 DepartmentId 。
+----+-------+--------+--------------+
| Id | Name | Salary | DepartmentId |
+----+-------+--------+--------------+
| 1 | Joe | 85000 | 1 |
| 2 | Henry | 80000 | 2 |
| 3 | Sam | 60000 | 2 ... | true |
8751b0da7a39319a7385c87cd054db937edc68a4 | SQL | Muzaffardjan/qashstat | /module/TypoReport/data/tables/typo.sql | UTF-8 | 676 | 2.8125 | 3 | [] | no_license | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXISTS `typo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`text` varcha... | true |
1caff649358aeeb25f304c084c3006d0a498c25c | SQL | zihanhannah/database-exercises | /join_exercises.sql | UTF-8 | 2,212 | 4.5625 | 5 | [] | no_license | USE employees;
SELECT * FROM dept_manager;
# write a query that shows each department along with the name of the
# current manager for that department.
SELECT d.dept_name AS 'Department Name', CONCAT(e.first_name,' ', e.last_name) AS 'Manager Name'
FROM employees as e
JOIN dept_manager AS dm
ON e.emp_no =... | true |
6c2f86cc8b0bea49cee395472a5c0391b53e036a | SQL | Peter00007/NoticeBoard | /backup.sql | UTF-8 | 12,364 | 2.984375 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 12.1
-- Dumped by pg_dump version 12.1
-- Started on 2020-03-03 16:56:27
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... | true |
290922e14367a2c77156e73b97fc4fa41b25a843 | SQL | Whole-Earth-Catalog/WEBC-SQL-Scripts | /build/create_master_table.sql | UTF-8 | 331 | 3 | 3 | [] | no_license | use webc;
drop table master_help;
# create master table with id, language, title, decade, to help with top term queries
create table master_help as
select tag245.id as id, tag245.$a as title, substring(tag008.data, 36, 3) as lang, substring(tag008.data, 8, 3) as decade
from tag245, tag008
where tag008.id=tag24... | true |
dcfcf07515a86f92654a9d6eca7a9c4338346f1d | SQL | LinkedOpenDataUFRJ/JISA_Article_PowerAnalisys | /views.sql | UTF-8 | 2,496 | 3.765625 | 4 | [] | no_license | CREATE INDEX doadores on receitas_candidatos(ano, cpf_cnpj_doador);
CREATE INDEX doadores on receitas_comites(ano, cpf_cnpj_doador);
CREATE INDEX doadores on receitas_partidos(ano, cpf_cnpj_doador);
CREATE VIEW MultiplosCPFs AS
SELECT DISTINCT NOME_CANDIDATO, GROUP_CONCAT(DISTINCT CONCAT(ANO_ELEICAO, ' - ', CPF_CANDID... | true |
84fd4fa922c5ee6a9c36b0509beae8805aecaa10 | SQL | AshleyWhaley/Employee-tracker | /db/seed.sql | UTF-8 | 730 | 2.9375 | 3 | [
"MIT"
] | permissive | INSERT INTO department (depart_name)
VALUES
('Executive Commander'),
('Assistant to the Commander'),
('Medical Staff'),
('Engineer'),
('Communication'),
('Navigation'),
('Red Shirt');
INSERT INTO role (title, salary, department_id)
VALUES
('Commanding Officer', 200, 1),
('First Officer', 150, 2),
('Chief Medical Offic... | true |
a738f91e78288bc999c43efff7530e8bd73eca2b | SQL | descriptions-of-it-technologies/oracle-sql-plsql | /labs/sql1/code_ex/code_ex_05.sql | UTF-8 | 6,171 | 3.65625 | 4 | [] | no_license | --The SQL Script to run the code_examples for Lesson 5
--Uncomment code below to run the code for slide 10_na for lesson 5
/*
SELECT employee_id, TO_CHAR(hire_date, 'MM/YY') Month_Hired
FROM employees
WHERE last_name = 'Higgins';
*/
--Uncomment code... | true |
5d62ad9e7f58c57ef7c27243362b12cfb36b4955 | SQL | markarowabove/analysis | /raft/raft_dp_eventbrite_ticket_types.sql | UTF-8 | 766 | 3.578125 | 4 | [] | no_license | -- dp gift to eventbrite ticket type
use dp;
-- diff - additional records
if (object_id('tempdb..#ids') is not null) begin drop table #ids end;
select a.Donor_Perfect_Id__c as Id into #ids from dpcampaigns a
left join dp_old.dbo.dpcampaigns b on a.Donor_Perfect_Id__c = b.gift_id
where b.gift_id is null;
--select * fro... | true |
2e787fd774f61e5c42b0289776d6176b9165e44c | SQL | Armandot1998/AgroIniap | /Versiones Anteriores/15-04-2020/SQL/Sentencias.sql | UTF-8 | 1,304 | 3.484375 | 3 | [] | no_license | select * from Agr_Provincia order by nombre
insert into agr_Provincia (nombre) values ('Cotopaxi');
insert into agr_Canton (id_provincia, nombre) values (1, 'Puerto Quito');
select * from Agr_Canton
alter table Agr_Caton rename to Agr_Canton
delete from Agr_canton
SELECT Id_Canton,nombre FROM Agr_Canton where Id_Provi... | true |
16c23cc564d2f7f66c2f376efc352705e36ab3cd | SQL | Niranjani29/SQL_queries | /Q4.sql | UTF-8 | 771 | 3.515625 | 4 | [] | no_license | --Oracle
-- create table Postal (
-- Name varchar2(20) not null,
-- Address varchar2(1),
-- ID number not null,
-- SameFam number,
-- Primary key(ID)
-- );
-- insert all
-- into Postal values('Alice', 'A', 10, NULL)
-- into Postal values('Bob', 'B', 15, NULL)
-- into... | true |
5f1dafcc0f7bf7e0f3c24d9c50eeb5c4452509d7 | SQL | Gabriel-RdS/AnaliseDeDadosAPI_ME | /Querys_BD/Query_CriandoTables_2.sql | UTF-8 | 2,408 | 3.078125 | 3 | [] | no_license | CREATE table Request
(id int (10) AUTO_INCREMENT,
PRIMARY KEY (id),
method varchar(10),
url varchar (150),
uri varchar (150),
size int (50),
querystring varchar (50),
headers_accept varchar (50),
headers_host_data varchar(100),
headers_user_agent varchar (50)
);
CREATE TABLE upstream_uri
(id int (10) AUTO_INCREMENT,
P... | true |
2e7f6c9f7ed1e31d24a312a07860ec49304d1768 | SQL | zakkyzebra/Database_Exercises | /update_exercises.sql | UTF-8 | 338 | 2.890625 | 3 | [] | no_license | USE codeup_test_db;
SELECT name FROM albums;
UPDATE albums
SET sales = (sales * 10);
SELECT name FROM albums WHERE release_date BETWEEN 1800 AND 1980;
UPDATE albums
SET release_date = (release_date - 100);
SELECT name FROM albums WHERE artist = 'Michael Jackson';
UPDATE albums
SET artist = 'Peter Jackson'
WHERE artist ... | true |
bedc00024ee1fff5b4aff38431a0dd9d8a2e0e86 | SQL | By2048/Notes | /数据库/MySQL/_code/mzitu-sql.sql | UTF-8 | 5,103 | 3.390625 | 3 | [] | no_license | drop database mzitu;
create database mzitu charset utf8;
use mzitu;
create table Folder
(
Id int auto_increment,
Name varchar(100) not null,
Path varchar(100) not null,
CreateDate datetime not null,
ImgNum int not null,
TotalSize ... | true |
8e0f64255a55b05e5a7bea414658a3da5d42b636 | SQL | bellmit/origin | /family_order/sql/.svn/pristine/8e/8e0f64255a55b05e5a7bea414658a3da5d42b636.svn-base | UTF-8 | 1,993 | 3.6875 | 4 | [] | no_license | --按市县兑奖情况查询积分兑奖汇总小计
SELECT action_code para_code1,action_name para_code2,sum(action_count) para_code3,
sum(value_changed_sub) para_code4,'' para_code5,'' para_code6,
'' para_code7, '' para_code8, '' para_code9, '' para_code10,
'' para_code11,'' para_code12,'' para_code13,'' para_code14,'' para_... | true |
a7d0fcd22fa238dac02bea03071452ace99d15ee | SQL | marcel-ausan/com.schlemmer.erp | /UsefulSQLQueries/ausan/OrdStatisticBacklogMartina.sql | UTF-8 | 6,441 | 3.359375 | 3 | [] | no_license | select b.customer_no "Customer"
,substr(b.customer_name,1,20) "Name"
,b.customer_part_no "Customer PN"
,b.part_no "Part"
,b.part_desc "Description"
,case when trim(state) in ('Geliefert','Delivered') then 'deliv.not.ivcd' else
case when trim(b.state) in ('Reserved','Picked','PickLi... | true |
b8d77f4016822a96148ca30ef1180bea69ce07a5 | SQL | fallaciousreasoning/SENG365-Polls | /sql/create_tables.sql | UTF-8 | 3,822 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 26, 2015 at 11:02 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
3ef29d3c81fa9c04942bf24e68ffa921e06f0171 | SQL | tupchiienko/Cursor_Homework17 | /src/main/resources/query.sql | UTF-8 | 495 | 3.328125 | 3 | [] | no_license | CREATE DATABASE library_db;
CREATE TABLE users
(
id INTEGER NOT NULL PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE books
(
id INTEGER NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
user_id INTEGER,
CONSTRAINT books_users_user_id_fk FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE autho... | true |
43ad8821306b7854faea8dabd4a41ed19f5d00e7 | SQL | go2suresh1979/MyRepo | /Personal/Solaris/main/datawarehouse/sql/exchg/cr_exchg_table.sql | UTF-8 | 34,659 | 3.265625 | 3 | [] | no_license | /*
**
** Component: $Id: //ovo8/main/datawarehouse/sql/exchg/cr_exchg_table.sql#2 $
** Author: Tze Ken Soh
** Copyright: VerizonBusiness, 2007. All Rights Reserved.
** Description: This script creates the Exchg tables.
**
*/
DROP TABLE exchg_instance;
CREATE TABLE exchg_instance
(
node_id NUMBER(1... | true |
2fc18e0ebe217dd549ba2a3147f7bdc853217cb4 | SQL | hardikrakholiya/advanced-database-concepts | /A1/Assignment1 soln.sql | UTF-8 | 10,303 | 4.3125 | 4 | [] | no_license | -- Solutions for Asssignment 1
-- 1. Create a database in PostgreSQL that stores these relations.
-- Make sure to specify primary and foreign keys.
DROP TABLE sailor;
CREATE TABLE sailor(sid integer,
sname VARCHAR(20),
rating integer, age integer,
PRIMARY... | true |
15e0f577454558a12903c5a9ae4e1f797cf8e4f8 | SQL | bixbyte/roomres | /roomres/4v41l.sql | UTF-8 | 1,290 | 2.59375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 19, 2014 at 11:35 PM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
c6cd601d0ff3ec65772a2cc1e46aab5222dbe031 | SQL | RamonMR95/Oracle | /UM/bdg2301-p2/scripts/bdg2301-p2-07.sql | ISO-8859-1 | 485 | 3.78125 | 4 | [] | no_license | --7. Alquileres (id) que incluyen dos coches (coche), es decir, con slo dos coches en el
--detalle de los alquileres individuales (por coche) en que consiste, y mediante qu
--agencia se ha contratado (agencia), ordenadas por identificador de alquiler
SELECT id, coche, agencia
FROM (DETALLE_ALQUILER JOIN ALQUILER ON alq... | true |
68ce7a6bb5bc6d0d12a8cc2a0e06b75dab2d623b | SQL | kbfoerster/postgres_nyctrees | /code/building_tables.sql | UTF-8 | 2,612 | 3.234375 | 3 | [
"CC0-1.0"
] | permissive | -- Creating our initial temporary table to copy into other individual tables
COPY temp_import FROM '/usr/share/data/data.csv' DELIMITER ',' CSV HEADER;
-- Copying from temp to healthstatus
INSERT INTO healthstatus (healthstatus)
SELECT DISTINCT healthstatus
FROM temp_import
ON CONFLICT DO NOTHING;
-- Copying from tem... | true |
585cb96159313408f6d68cfbd2dd4542bfc2c6bb | SQL | vreplicon/gear-closet-api | /migrations/002.do.create_gear_table.sql | UTF-8 | 256 | 2.59375 | 3 | [] | no_license | CREATE TABLE gear (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL,
gear_name TEXT NOT NULL,
gear_type TEXT NOT NULL,
gear_weight FLOAT,
weight_unit TEXT,
notes TEXT
); | true |
e1cba57e118fae0cd14516406368ad178c885cd2 | SQL | voltan/pi-card-module | /card/sql/mysql.sql | UTF-8 | 5,399 | 3.078125 | 3 | [] | no_license | CREATE TABLE `{product}` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`category` int(10) unsigned NOT NULL default '0',
`title` varchar(255) NOT NULL default '',
`slug` varchar(255) NOT NULL default '',
`text_description` text,
`seo_title` varchar(255) NOT NULL default '',
`seo_keywords`... | true |
6366f1529efcdac7ba72763562cce84b4bedfd5c | SQL | seufster71/toasthub-db | /cborgtech-db/toasthub-trade/alg_SL_db.sql | UTF-8 | 900 | 2.96875 | 3 | [] | no_license | DROP TABLE IF EXISTS `ta_SL`;
CREATE TABLE `ta_SL`
(`id` bigint(20) NOT NULL AUTO_INCREMENT,
`identifier` varchar(64),
`epoch_seconds` bigint(20),
`corresponding_day`bigint(20),
`symbol` varchar(64),
`evaluation_period` varchar(64),
`evaluation_duration` bigint(20),
`value` decimal(10,4),
`is_active` bit(1) ... | true |
a812eccc9948f62247d36c325e4bd4ff1e92256d | SQL | haibotop/URP | /历史代码/张文峰库存数据处理.sql | GB18030 | 1,670 | 4.28125 | 4 | [] | no_license | SELECT * FROM tt
SELECT * FROM tt1
WITH ctea AS(
SELECT row_number() over(order by ) as ,row_number() over(PARTITION by order by ) as ,a.* FROM
tt a CROSS JOIN Nums n
WHERE n.n<=a.
) ,cte AS(
SELECT ROW_NUMBER() OVER (PARTITION BY b. ORDER BY NEWID() ) as ID ,b. as 1,b.Ʒ,b.,b.ɹ,
a.,a.,a.,a.ֿ,a.ֿ,a.Ʒ,a.,a.Ӧ̱,a.Ӧ,a... | true |
7c6e230660f9536e8758497b4011bdf4f95a368c | SQL | neostreet/poker_session_data | /simple_recipe.sql | UTF-8 | 307 | 2.921875 | 3 | [] | no_license | use poker
select num_hands hands,num_entries entries,places_paid paid,place,
winnings,concat(poker_session_date,tournament_letter)
from poker_sessions
where poker_style = 2 and poker_flavor = 3 and
num_hands is not null and num_entries is not null and
num_hands > num_entries
order by winnings desc;
quit
| true |
9d403b4ca0f382e59418e09db53f230b57a677e2 | SQL | buqento/wisma | /tbl_profiles.sql | UTF-8 | 1,419 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2017 at 03:13 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
b50d5dd696bcbcdf446c055b9ae6b2da7bcb5bec | SQL | geethika02/VolunteerSystem_Project | /Volunteer System/sms.sql | UTF-8 | 3,444 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2021 at 02:34 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
1a11a7f74838e3aaa6e197e89015b10a4f6dad58 | SQL | nastya44/dbis-2 | /sql/V4__migrate_ee.sql | UTF-8 | 693 | 2.984375 | 3 | [] | no_license | INSERT INTO "EE" ("EE", "EParent", "EType", "Region" , "Area", "Ter")
SELECT DISTINCT ON ("eoname") "eoname", "eoparent", "eotypename", "eoregname","eoareaname","eotername"
FROM "tbl_grade"
WHERE "eoname" IS NOT NULL;
INSERT INTO "EE" ("EE", "Region" , "Area", "Ter")
SELECT DISTINCT ON ("ukrptname") "ukrptname", "ukrp... | true |
83ca0d452bd5c30dcfb380a2af39361638f480ca | SQL | syuja/GreenPlumSetup | /script/crimedb_scripts/Join/join_r.sql | UTF-8 | 140 | 2.90625 | 3 | [] | no_license | SELECT f_crimes_r1.id, jf_crimes_r1.primary_type
FROM f_crimes_r1
INNER JOIN jf_crimes_r1
ON f_crimes_r1.date = jf_crimes_r1.date
LIMIT 10;
| true |
f58602a56ccb3645d7c5cb1fdd67d8c4be872578 | SQL | fabjj77/OZTT-2016 | /03_Database/SQL/create_t_cons_order.sql | UTF-8 | 975 | 2.5625 | 3 | [] | no_license | DROP TABLE IF EXISTS `t_cons_order`;
CREATE TABLE `t_cons_order` (
`no` bigint(12) NOT NULL AUTO_INCREMENT,
`orderNo` varchar(16) NOT NULL,
`customerNo` varchar(16) NOT NULL,
`orderAmount` decimal(12, 2),
`paymentMethod` varchar(6) DEFAULT NULL,
`orderTimestamp` timestamp NULL DEFAULT NULL,
`paymentTimes... | true |
6b14559491b4d31a61c6f429c5a4cb52cc6383f6 | SQL | agfy/Alfred | /db_tables/orders_db.sql | UTF-8 | 215 | 2.625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS orders (
id SERIAL PRIMARY KEY,
owner_telegram_id INTEGER,
buyer_telegram_id INTEGER,
goods_id INTEGER,
amount INTEGER,
create_time TIMESTAMP WITHOUT TIME ZONE
); | true |
417dba5df6cdb8e1a906f106039ede00ca06de55 | SQL | zoniibtw/csgo-rent-api | /skin.sql | UTF-8 | 2,756 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Värd: localhost
-- Tid vid skapande: 08 jul 2021 kl 20:23
-- Serverversion: 8.0.21-0ubuntu0.20.04.4
-- PHP-version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
37fd22583aebd2fd22f9543dce66c914f89f4f82 | SQL | AnushreeAnkola/FindASportPartner | /Sports/Users.sql | UTF-8 | 2,266 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 07, 2017 at 05:02 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d7464ab1b420ef2e3661e19b6e3feec5185c2e04 | SQL | SebTou08/TF_DataBase | /INSERTS_TF_1.2.sql | UTF-8 | 6,083 | 2.5625 | 3 | [] | no_license |
insert into Zona
VALUES (54241, 'Parque Zonal VES'),
(47447, 'Playa Agua Dulce'),
(58774, 'Bajada Balta'),
(87455, 'Parque Zonal SJM'),
(69274, 'Parque Kennedy'),
(05752, 'Parque de la amistad'),
(78240, 'Parque la Perla del amor'),
(52482, 'Malecon de miraflores '),
... | true |
d6e455bfc720d6ce7cdb6bfd0a196cd36b934062 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Procedures/RENEW_GD_PLAN.sql | WINDOWS-1251 | 2,502 | 3.5625 | 4 | [] | no_license | --
-- RENEW_GD_PLAN (Procedure)
--
CREATE OR REPLACE PROCEDURE MASTER.Renew_Gd_Plan (DATE_BEG DATE:=TRUNC(SYSDATE,'MONTH') ,DATE_END DATE:=SYSDATE, param1 VARCHAR2:='', param2 VARCHAR2:='', param3 VARCHAR2:='') IS
vTipPlan VARCHAR2(50);
BEGIN
IF param1 || ' ' =' ' OR (NLS_UPPER(param1)<>'DAY' AND NLS_UPPER(param... | true |
98ec57a480d7a49e0cf69adb71e51fb98d59e141 | SQL | fleetmack/mines | /me/annual_fund/laura_s/20111107_st_louis.sql | UTF-8 | 585 | 3.234375 | 3 | [] | no_license | /*** St. Louis Folks ***/
select dw.id_number, dw.pref_mail_name, dw.pref_name_sort, dw.pref_class_year, dw.record_type_code, dw.p_email_address, dw.p_city, dw.p_state_code, dw.p_zipcode, dw.p_phone_formatted, pm.ass_pref_mail_name, pm.ass_pref_name_sort
from a_dw_address_good dw,
a_dw_assignment_pm pm
where pm.i... | true |
9814937f3f276aa3b84497ec41a3a168c48e34e1 | SQL | Vinay523/Jubi | /Downloads/root/jubi.api/models/scripts/procedures/get_program_user.sql | UTF-8 | 3,797 | 4.3125 | 4 | [] | no_license | DROP procedure IF EXISTS `get_program_user`;
CREATE PROCEDURE `get_program_user`(IN ref VARCHAR(100), IN preview INT)
BEGIN
SELECT get_program_link_id(ref) INTO @linkId;
SELECT get_current_program_id(@linkId, preview) INTO @id;
SELECT
P.id,
P.linkId,
P.slug,
P.title,
P.description,
P.im... | true |
608f849402148a37ea7c2af2c3aaac747a0d901d | SQL | iloveloveyou/oracle-scripts | /Win32Script/HotBackup Macerata/HotBackup.sql | UTF-8 | 1,772 | 2.671875 | 3 | [] | no_license | column dummy noprint
DEFINE backup_dir = 'c:\temp'
set trimspool on
set linesize 500
set termout off
set echo off
set pagesize 0
set heading off
set verify off
set feedback off
whenever SQLERROR exit 1
spool backup_script.sql
select 'set echo on' from dual;
select 'spool backup_script.log' from dual;
select '... | true |
25344423ff4cbf5a5c6cef4eb3c23e636e80045d | SQL | jeremyxie712/opalForm | /opalAdmin-eason/dbv/data/revisions/2/announcement_delete_trigger.sql | UTF-8 | 381 | 2.546875 | 3 | [] | no_license | CREATE TRIGGER `announcement_delete_trigger` AFTER DELETE ON `Announcement`
FOR EACH ROW BEGIN
INSERT INTO `AnnouncementMH`(`AnnouncementSerNum`, `CronLogSerNum`, `PatientSerNum`, `PostControlSerNum`, `DateAdded`, `ReadStatus`, `ModificationAction`) VALUES (OLD.AnnouncementSerNum, OLD.CronLogSerNum, OLD.PatientSerNum,... | true |
25aaae0178a11783b8473a43f12f99276b4dcbce | SQL | sedc-codecademy/sedc6-database | /sessions/functions-and-branching/empty-albums.procedure.sql | UTF-8 | 129 | 2.953125 | 3 | [] | no_license | create procedure spEmptyAlbums
as
begin
select *
from Albums a
where a.Id not in
(select distinct(s.AlbumId) from Songs s)
end
| true |
076bfef728abc8ee0c21e1dab30c587af562a210 | SQL | pgcodekeeper/pgcodekeeper | /ru.taximaxim.codekeeper.core.tests/src/main/resources/ru/taximaxim/codekeeper/core/chg_privilege_diff.sql | UTF-8 | 2,266 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | SET search_path = pg_catalog;
REVOKE ALL ON SCHEMA test_schema FROM maindb;
REVOKE ALL ON SCHEMA test_schema FROM PUBLIC;
REVOKE ALL ON SCHEMA test_schema FROM botov_av;
GRANT ALL ON SCHEMA test_schema TO botov_av;
GRANT ALL ON SCHEMA test_schema TO fordfrog;
REVOKE ALL ON TYPE public.typ_composite FROM maindb;
GRAN... | true |
e144715a33b36a101f43b0d979d3cd5df8d7798a | SQL | SeanShubin/condorcet5 | /domain-db/src/main/resources/sql/remove-voters-from-election.sql | UTF-8 | 85 | 2.796875 | 3 | [
"Unlicense"
] | permissive | delete
from voter
where election_id =
(select id from election where name = ?)
| true |
9d213629b17341c9eda9ca7bda7eb332b1fe01a9 | SQL | radtek/abs3 | /sql/mmfo/bars/Procedure/p_f33sb.sql | WINDOWS-1251 | 9,267 | 2.59375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Procedure/P_F33SB.sql =========*** Run *** =
PROMPT =====================================================================================
PROMPT *** Create procedure... | true |
71336bb6dcc5deb1c8f4cc676f963d18e29a849d | SQL | woshihuo12/evilbonefun | /egameserver/src/main/resources/data/dynamic/sql/reunion.sql | UTF-8 | 5,965 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | # SQL Manager 2005 Lite for MySQL 3.6.0.3
# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : reunion
SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS `reunion`;
CREATE DATABASE `reunion`
CHARACTER SET 'utf8'
COLLATE 'utf8_unicode_ci';
USE `reunion`;
DROP TABLE... | true |
6c39bf069ba0928a810e6013e7188c4f337e2762 | SQL | dkellycollins/KSU_CIS560 | /db_Design/queries/get_customer_accounts.sql | UTF-8 | 860 | 4.09375 | 4 | [] | no_license | /* Showcases queries that can be used to get a list of all account for a user.
In the first query 1 is the Id parameter.
In the second query "Bob" is the first name parameter and "Parker" last_name.
*/
SELECT A_ID, Balance, Interest_Rate
FROM Account
WHERE C_ID = 1;
/* Expected Result
+------+---------+-------... | true |
dd33106bc467d03e9b8c462153c5fcdfd57d02fd | SQL | ngogiahuy1503/test | /databaselaptop1.sql | UTF-8 | 5,858 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2015 at 08:18 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
4f59544985f29a9548ae5a2fd89f81d5a958e4e3 | SQL | fdrennan/redditstack | /airflow/sql/mv_submissions_count.sql | UTF-8 | 204 | 3.09375 | 3 | [] | no_license | create materialized view submissions_count as (
select date_trunc('minute', time_collected_utc) as submission_collected, count(*) as n
from public.submissions
group by submission_collected
);
| true |
08c9e2e0899f59dcc431de14b3e73c67bf7d6dcd | SQL | tmddnr712/BigData_DB | /0706/EMP.sql | UTF-8 | 3,871 | 3.921875 | 4 | [] | no_license | -- DROP TABLE DEPT;
/*CREATE TABLE DEPT(
deptno TINYINT PRIMARY KEY,
dname VARCHAR(14),
loc VARCHAR(13)
);
CREATE TABLE EMP(
empno SMALLINT PRIMARY KEY,
ename VARCHAR(10),
job VARCHAR(9),
mgr SMALLINT,
hiredate DATE,
sal FLOAT,
comm FLOAT,
deptno TINYINT,
foreign KEY(DEPTNO) REFERENCES DEPT(DEPTNO)
);
CREATE TABLE... | true |
0f3a19a8e9053c89b3387fdedb45adb8b6ef78f5 | SQL | hhrianyk/BASICS_OF_DATABASES | /Trade enterprise/Views/L6_2.sql | UTF-8 | 1,027 | 3.1875 | 3 | [] | no_license | CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`localhost`
SQL SECURITY DEFINER
VIEW `l6_2` AS
SELECT
`партія`.`Код_товара` AS `Код_товара`,
`партія`.`Код_партіі` AS `Код_партіі`,
`партія`.`Код_накладної` AS `Код_накладної`,
`партія`.`Кількість` AS `Кількість`,
... | true |
f1c26cf01063fc5ba58564d41b22ee98527b1d5c | SQL | tran6388-1672747/dbms | /hw3/submission/hw3-q6.sql | UTF-8 | 324 | 2.8125 | 3 | [] | no_license | -- run time on S0 DB: 1 sec
-- result row count: 4 rows
select name as carrier from CARRIERS
where cid in (
select distinct carrier_id from FLIGHTS
where origin_city = 'Seattle WA' and dest_city = 'San Francisco CA'
)
-- Partial output:
--Alaska Airlines Inc.
--SkyWest Airlines Inc.
--United Air Lines Inc.
--Virgin Ame... | true |
0007a3c44ad39f4d93746ac7929c570460c43467 | SQL | Archy03/java-internship-csongor-buru | /src/main/resources/db/changelog/changelog-tag_post.sql | UTF-8 | 396 | 2.6875 | 3 | [] | no_license | -- liquibase formatted sql
-- changeset Buru Csongor:1
CREATE TABLE tag_post
(
post_id bigint NOT NULL,
tag_id bigint NOT NULL,
PRIMARY KEY (post_id, tag_id),
CONSTRAINT fk_tag_post_post FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT fk_tag_post_tag FOR... | true |
1f6f39b3c532c45d462064e6a312f1c090b5f1c5 | SQL | FerEduard/wux | /wux.sql | UTF-8 | 12,253 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-09-2017 a las 04:20:28
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
58844a8a880517f5af1641db2f68befbc2ce9cf2 | SQL | ebobzom/Elijah-Airline-Reservation-System | /Elijah-Airline-reservation.sql | UTF-8 | 2,174 | 3.765625 | 4 | [] | no_license | CREATE DATABASE tiidelab;
USE tiidelab;
CREATE TABLE users(
user_id INT(11) AUTO_INCREMENT PRIMARY KEY NOT NULL,
first_name VARCHAR(22) NOT NULL,
last_name VARCHAR(22) NOT NULL,
middle_name VARCHAR(22),
date_of_birth DATE,
created_date DATETIME,
email VARCHAR(32) UNIQUE NOT NULL,
password VARCHAR(256),
contact_address... | true |
7bb7bd4de43d700ed7c797505ee7b938494471ba | SQL | nickkneafsey/obie-api | /db/schema.sql | UTF-8 | 5,780 | 3.59375 | 4 | [] | no_license |
DROP DATABASE IF EXISTS obie;
CREATE DATABASE obie;
USE obie;
-- ---
-- Globals
-- ---
-- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- SET FOREIGN_KEY_CHECKS=0;
-- ---
-- Table 'users'
--
-- ---
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` INT AUTO_INCREMENT,
`name` VARCHAR(20) NOT NULL,
`email` V... | true |
0e1d4463dba95f7df4d62deb7350a8d75d6f9c28 | SQL | zakuby/pemweb2 | /saku (1).sql | UTF-8 | 7,263 | 3.078125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 04 Jan 2016 pada 18.19
-- Versi Server: 10.1.9-MariaDB
-- PHP Version: 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
9370bdbd155e85314ce7878f9fab11073519f9b3 | SQL | sbeparey/databases | /src/Northwind/Sqlite/Tables/02. Customers.sql | UTF-8 | 1,187 | 3.546875 | 4 | [] | no_license | DROP TABLE IF EXISTS customers;
CREATE TABLE customers (
customer_id CHAR(5) NOT NULL,
company_name VARCHAR(40) NOT NULL,
contact_name VARCHAR(30) NULL,
contact_title VARCHAR(30) NULL,
address VARCHAR(60) NULL,
city ... | true |
b8a4d8060273bf78e4b71ee9767923c62cf23e67 | SQL | ArturGudiev/subd | /1.sql | UTF-8 | 2,130 | 3.859375 | 4 | [] | no_license | create table userroles (
id number GENERATED ALWAYS AS IDENTITY,
name varchar2(50),
description varchar2(50),
canModifyRecords number(1),
canModifyUserAccounts number(1)) ;
ALTER TABLE userroles
ADD (
CONSTRAINT userroles_pk PRIMARY KEY (id)
);
insert into userroles (name, descriptio... | true |
fc723c712f2ffdf32c91918b8ae20ac03e3a823f | SQL | st3panzz/Autoservis | /databaze.sql | UTF-8 | 14,784 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 09, 2021 at 02:43 PM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
fdc71f3740b7a44133ba03db0eea5636ca4382b7 | SQL | genxium/ExpressDemoWithReact16 | /database/skeema-repo-root/player_auth_binding.sql | UTF-8 | 396 | 2.515625 | 3 | [] | no_license | CREATE TABLE `player_auth_binding` (
`player_id` bigint unsigned NOT NULL,
`channel` smallint unsigned NOT NULL,
`auth_id_in_channel` varchar(128) NOT NULL,
`created_at` bigint unsigned NOT NULL,
`deleted_at` bigint unsigned DEFAULT NULL,
`updated_at` bigint unsigned DEFAULT NULL,
PRIMARY KEY (`player_id`... | true |
f3d91eda52a05d3a5fab41a0d1a667dcd199b6e8 | SQL | joshborup/company-tracker | /db/get_student_attendance.sql | UTF-8 | 183 | 3.078125 | 3 | [] | no_license | select absent, tardy, left_early, reason, TO_CHAR(calender_day :: DATE, 'Mon dd, yyyy') from attendance
where student_id = $1
group by calender_day, absent, tardy, left_early, reason; | true |
7d4486dae4738a9cedde1fd3e605e15207600e14 | SQL | chiranjitengineer/learngit | /OfficeWorks/GRATUITY ENTITLE/New 2.sql | UTF-8 | 2,961 | 2.6875 | 3 | [] | no_license | SELECT * FROM MENUMASTER_RND
WHERE UPPER(MENUDESC) LIKE UPPER('%%')
SELECT * FROM MENUMASTER_RND
WHERE MENUCODE=''
SELECT * FROM ROLEDETAILS
WHERE MENUCODE=''
SELECT * FROM REPORTPARAMETERMASTER
WHERE REPORTTAG = ''
SELECT * FROM MENUMASTER_RND
WHERE UPPER(MENUTAG) LIKE UPPER('%%')
SELECT * FROM MENUMASTER_R... | true |
072ff8e3bb6abdc190993cd0bb8268a9a5c368a1 | SQL | rlafferty/oracle-scripts | /poder_pub/sqlid.sql | UTF-8 | 1,285 | 3.015625 | 3 | [] | no_license | col sql_sql_text head SQL_TEXT format a150 word_wrap
col sql_child_number head CH# for 999
prompt Show SQL text, child cursors and execution stats for SQLID &1 child &2
select
hash_value,
child_number sql_child_number,
sql_text sql_sql_text
from
v$sql
where
sql_id = ('&1')
and child_number like ... | true |
4c859fb07d525fb16c8c012cc29cd9dab20cff10 | SQL | palashbairagi/Reality-Show | /audition.sql | UTF-8 | 2,274 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 09, 2015 at 10:56 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
ea7c2cd77cf7ef479cca6e8a806b63aaad0f093b | SQL | Jean-Roc/sia_sql | /export/ue/phase.sql | UTF-8 | 703 | 4.03125 | 4 | [] | no_license | -- export les UE avec informations sur la phase associée
SELECT DISTINCT
ue.numero AS "UE",
(SELECT valeur FROM app.liste WHERE liste.id = ue.id_type) AS "Type",
ue.tpq AS "TPQ",
ue.taq AS "TAQ",
COALESCE(phase.nom, NULL) AS "Phase",
COALESCE(phase.tpq, NULL) AS "Phase TPQ",
COALESCE(phase.taq, NUL... | true |
b1743cc91c547bb87081f1b795fa8b3c05afdb6b | SQL | DMilmont/mode | /Mode/roadster/spaces/Customer - AdHoc/SET Report.3e25e4e81815/Online Metrics - Daily Data.d14f36cbe098.sql | UTF-8 | 1,112 | 3.765625 | 4 | [] | no_license | WITH filter_for_dpids as (
SELECT DISTINCT CASE WHEN di.dealer_group IS NULL THEN dealer_name ELSE di.dealer_group END dealer_group
FROM fact.salesforce_dealer_info_SET di
INNER JOIN public.dealer_partners dp on di.dpid = dp.dpid
WHERE name <> 'Lexus Of Pleasanton'
)
,dpids as (
SELECT DISTINCT name
FROM fact.... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.