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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
db194163f90ab0081bba817526fc3d9a1070487f | SQL | cartershanklin/structor | /modules/benchmetrics/files/etl/all_types/load_all_types_csv.sql | UTF-8 | 3,978 | 2.75 | 3 | [] | no_license | drop database if exists all_types cascade;
create database all_types;
use all_types;
create table all_types(
tinyint_val tinyint,
smallint_val smallint,
int_val int,
bigint_val bigint,
float_val float,
double_val double,
decimal_18_2_val decimal(18, 2),
decimal_36_6_val decimal(36, 6),
string_val ... | true |
d928695ec2f16e8ef06e755190898a3368272cb3 | SQL | carlosfeitosa/zf_project | /rochedo/zendstudio/zf_project/scripts/db/pgsql/data/sprints_0001~0013/0005_containers/data_seq_000045.05.basico.include.sql | UTF-8 | 1,484 | 3.25 | 3 | [] | no_license | /**
* SCRIPT DE POPULACAO DA TABELA basico.include
*
* Esta tabela armazena os includes que podem ser utilizados pelo sistema.
*
* versao: 1.0 (POSTGRESQL 9.1.1)
* por: JOÃO VASCONCELOS (joao.vasconcelos@rochedoframework.com)
* criacao: 22/03/2012
* ultimas modificacoes: 03/04/2012 - Criação dos inserts dos includes ... | true |
465d2dc571edc0e7e4f8ba8a15f67df1c534920f | SQL | flymecode/SecKill | /miaosha.sql | UTF-8 | 4,233 | 3.390625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80013
Source Host : localhost:3306
Source Schema : miaosha
Target Server Type : MySQL
Target Server Version : 80013
File Encoding : 65001
Date: 31/01/2019 14... | true |
aac98cf8b3cc63466430de240a49fad58f724633 | SQL | 326th/Roughness-measurement-respository | /Tables.sql | UTF-8 | 1,540 | 3.171875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: db:3306
-- Generation Time: Dec 14, 2020 at 04:33 AM
-- Server version: 8.0.18
-- PHP Version: 7.2.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... | true |
a03980d68f1efc68f2c87332c6e53111054dfe68 | SQL | UzbekistanTeamADMS/SkyrocketSQLCareer | /SQL Queries/14.sql | UTF-8 | 377 | 4.21875 | 4 | [] | no_license | --Name the player which have the most votes in Hall Of Fame standings, in comparison to other players, and in which team he played?
select a.nameFirst, a.nameLast, b.name from People a, Teams b, Appearances c
where a.playerID = (select playerID from HallOfFame where votes = (select MAX(votes) from HallOfFame))
and... | true |
2b4152a831d736295066a93b35c26b2ce5a5e56c | SQL | sauravjayan/Shopify-Data-Challenge | /Question_2.sql | UTF-8 | 1,195 | 4.625 | 5 | [] | no_license |
-- a.
-- Number of orders shipped by Speedy Express is given by the code below
SELECT COUNT(a.OrderID) AS "Number of Orders"
FROM (SELECT sa.OrderID, sa.ShipperID, sb.ShipperName
FROM Orders As sa
INNER JOIN
Shippers AS sb
ON sa.ShipperID = sb.ShipperID) AS a
WHERE a.ShipperName == "Speedy Express"
-- The number of ... | true |
0ffe97f8d7ef78fc3dd44e61a46af46d43a1d470 | SQL | joincivil/indra | /modules/database/migrations/sqls/20190205215726-coinpayments-ipn-log-up.sql | UTF-8 | 374 | 2.796875 | 3 | [
"MIT"
] | permissive | create table coinpayments_ipn_log (
id bigserial primary key,
created_on timestamp with time zone not null default now(),
"user" csw_eth_address,
ipn_id text not null,
status integer not null,
status_text text not null,
address text not null,
data jsonb not null
);
create index coinpaym... | true |
7cf20b1b843c3a0a228ad98195beb9d60f79e3ed | SQL | juandillon/Proyectos-Dillon | /Pizzeria Krozz-Dillon/dumps/krozz_productos.sql | UTF-8 | 2,707 | 3.125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `krozz` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `krozz`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: krozz
-- ------------------------------------------------------
-- Server version 5.5.24-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
c268fb24d605eb7fe68fea9418b9a8c480fb28f7 | SQL | faeo/BD-ReformanDo | /bd.sql | UTF-8 | 3,573 | 3.4375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Qui 06 Set 2018 19:16:10 -03
-- Model: New Model Version: 1.0
-- 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... | true |
d2e4514d0bb6e2a4aa2eab0f5bd23266da95edea | SQL | xoscar/PrestaMax | /PrestaMaxBD/dbo/Stored Procedures/semana_actual_prestamo.sql | UTF-8 | 157 | 2.65625 | 3 | [] | no_license | create procedure semana_actual_prestamo
@id_prestamo int
as
select datediff([week], fecha_inicio, getdate())
from Prestamo
where pres_id = @id_prestamo | true |
bbc6d35542096d7668d198d1f5311a8a26c86fef | SQL | ivaneyvieira/separacaoRessuprimento | /src/main/resources/sqlSaci/userSenha.sql | UTF-8 | 787 | 2.765625 | 3 | [] | no_license | SELECT users.no,
users.name,
login,
auxLong1 AS storeno,
IFNULL(CAST(CONCAT(CHAR(ASCII(SUBSTRING(pswd, 1, 1)) + ASCII('e') - ASCII('j')),
CHAR(ASCII(SUBSTRING(pswd, 2, 1)) + ASCII('a') - ASCII('h')),
CHAR(ASCII(SUBSTRING(pswd, 3, 1)) + ASCII('c') - ASCII('k')),
CHAR(ASCII(SU... | true |
3741c847f1b471dddb9e018751ace9c61ad5034c | SQL | spitfirekg/-Complete-user-registration-system-using-PHP-and-MySQL | /test/user_register/SQL/test.sql | UTF-8 | 1,974 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 11, 2020 at 09:53 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
1c1a14d8bb392735c67e5277bc1f4cb1a26ed945 | SQL | smith701/smith | /Download/www/scripts/system/mysql/MSF_nouvelle_structure.sql | UTF-8 | 13,889 | 3.28125 | 3 | [] | no_license | -- --------------------------------------------------------
-- hôte: 127.0.0.1
-- version du serveur: 5.6.17 - mysql community server (gpl)
-- serveur os: win64
-- heidisql version: 8.3.0.4694
-- -------------------------------------------------------... | true |
6eb32eb48d07b1615b6daccb677bd036a8700f7d | SQL | BaobabHealthTrust/migration_imports | /db/age_in_months.sql | UTF-8 | 2,249 | 3.75 | 4 | [] | no_license | DROP FUNCTION IF EXISTS age_in_months;
DROP FUNCTION IF EXISTS age_in_months;
DELIMITER $$
CREATE FUNCTION age_in_months(birthd... | true |
5706f9af7f6bc929c06873d644227c1196cf2b08 | SQL | rigo-vartec/app-time | /averias_canceladas.sql | UTF-8 | 1,991 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-07-2021 a las 03:02:08
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0dfb85edf8291bf0c63224833b38dd27d60fb311 | SQL | Rasmind21/Inventory-Service-Manager- | /Base de Datos MYSQL/version 1.1/inventory_service_manager.sql | UTF-8 | 18,970 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 01-07-2021 a las 03:17:00
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
bae09b4a03ea8ca0970ef03477b70c8a3817eaed | SQL | balaby25/tpch | /hq21.sql | UTF-8 | 871 | 3.46875 | 3 | [] | no_license | set query_group to 'hq21';
set enable_result_cache_for_session to off;
select s_name, count(*) as numwait
from supplier, lineitem l1, orders, nation
where s_suppkey = l1.l_suppkey
and o_orderkey = l1.l_orderkey
and o_orderstatus = 'F'
and l1.l_receiptdate > l1.l_commitdate
and exists (
select *
from lineitem... | true |
48bef343407e4f80d8e43e047b67e8a1c3358a96 | SQL | Gabino25/perdocuments | /tables/XXAZOR_PER_DOCS.sql | UTF-8 | 1,101 | 2.828125 | 3 | [] | no_license | DROP TABLE APPS.XXAZOR_PER_DOCS CASCADE CONSTRAINT;
CREATE TABLE APPS.XXAZOR_PER_DOCS(ID NUMBER NOT NULL
,PERSON_ID NUMBER NOT NULL
,ASSIGNMENT_ID NUMBER NOT NULL
,DOC_TYPE VARCHAR... | true |
d5503bd2a5cd77def08bbe9ab660f402aab3e4e9 | SQL | menememad/market-network | /sql/marketnetwork.sql | UTF-8 | 782 | 3.453125 | 3 | [] | no_license | -- MarketNetwork.net Database --
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+02:00";
CREATE DATABASE `marketnetwork` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `marketnetwork`.`users` (
`id` INT NOT NULL,
`username` VARCHAR(15) NOT NULL,
`password` CHAR(32),
`firstname`... | true |
b2bf965225373674a0dc9d692eed1f9d0664c15e | SQL | juanlvo/plsql-course | /S11L84.sql | UTF-8 | 620 | 3.453125 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION get_sal_tax(p_sal NUMBER) RETURN NUMBER IS
BEGIN
IF p_sal<5000 THEN
RETURN p_sal*(10/100);
ELSE
RETURN p_sal*(15/100);
END IF;
END;
-----------------------------------
SELECT employee_id,
first_name,
last_name,
salary,
get_sal_tax(salary)
FROM em... | true |
ce7a66e1e088331db6275b6e583fb945b84d36fd | SQL | ReedOei/dt-fixing-tools | /src/main/sql/figures/average_diagnosed_fields.sql | UTF-8 | 208 | 3.5625 | 4 | [] | no_license | select ifnull(avg(ifnull(fields, 0)), 0)
from od_classification odc
left join diagnosis_info di on di.test_name = odc.test_name
where odc.od_type like ? and ifnull(fields, 0) >= ? and ifnull(fields, 0) <= ?;
| true |
d2f0f43c6a19c60c2f5033057aba32422c73f165 | SQL | awaters1/victorioussecret | /artist_alerter/database/sql/users.sql | UTF-8 | 942 | 3.875 | 4 | [] | no_license | --Creates the database table that will
--hold the users information and preferences
CREATE SEQUENCE user_seq;
CREATE SEQUENCE user_index_seq;
CREATE TABLE users (
user_id int8 NOT NULL DEFAULT nextval('user_seq') CONSTRAINT users_pk PRIMARY KEY,
username VARCHAR(100) NOT NULL CONSTRAINT username_unique UNIQUE,
emai... | true |
2f85e65c77a1bc4ac86fb6db848b84e2346eca86 | SQL | ManuelCanulDev/PlatformPracticas | /db/plataforma_practicas_Produccion.sql | UTF-8 | 6,669 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 13-11-2020 a las 06:02:24
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
92096e2b2776f609f3fc26c20830b45ea8744b3f | SQL | dhritimanG/DBMS | /JPA and Webservices/DIrector.sql | UTF-8 | 225 | 2.75 | 3 | [] | no_license | CREATE TABLE `DIRECTOR` (
`ID` int(11) NOT NULL,
`OSCARWINS` int(11) DEFAULT NULL,
PRIMARY KEY (`ID`),
CONSTRAINT `FK_DIRECTOR_ID` FOREIGN KEY (`ID`) REFERENCES `PERSON` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
| true |
12efe366399bd0d471b925144830d1fe269add9f | SQL | oracle614/automatic_monitor | /sql/get-dynamicPicNum.sql | UTF-8 | 528 | 3.140625 | 3 | [] | no_license | /*
author: cg
time: 2018-04-24
description: 获取规定时间内动态项中上传了的图片总数
*/
/*
SELECT
ROUND(sum((LENGTH(files)-LENGTH(replace(files,'http', ''))) / 4),0) AS dynamicPicNum
FROM
htg_record
WHERE
appendtime > 1537113600
AND appendtime <= 1537151171
AND effect = 1
AND active = 1
AND tags is null
*/
SELECT
ROUND(sum... | true |
1e78e10e7ed44ae5c14192712b68ee11ab8e4a29 | SQL | ghoshmithun/ImpProjectDoc | /GP US Reactivation Model Ssoni/GP_US_Reactivation_Training_ssoni.sql | UTF-8 | 68,047 | 3.78125 | 4 | [] | no_license | -------------------------- Gap US Reactivated Customers, Purchase Categories
------------------------- Get customers who purchased in 1st year, didn't purchase anything in 2nd year and then purchased again in 3rd year, alongwith the categories from which they purchased
---------- Set the start date of purchase window
s... | true |
4fa945c158d49d579b1df8b3aee43909bc8a6486 | SQL | DineshaKarunathilake/MeasurementApp | /Dump20161017.sql | UTF-8 | 8,525 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: measurement_app
-- ------------------------------------------------------
-- Server version 5.7.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... | true |
380e8957528fbfd02569f1af1b810dd6ed3fe42d | SQL | funball99/meidi | /WebRoot/WEB-INF/classes/meidi.sql | UTF-8 | 7,541 | 2.78125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Date: 2014-07-12 14:03:22
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for mdbranch
-- ----------------------------
DROP TABLE IF EXISTS `mdbranch`;
CREATE TABLE `mdbranch` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`bname` varchar(20)... | true |
2b0bb75d440c11cf9544ee84684857a293a08c66 | SQL | brookecm28/rich-recipes | /db/recipes/get_one_recipe_ing.sql | UTF-8 | 140 | 2.90625 | 3 | [] | no_license | SELECT * FROM rr_recipes r
JOIN rr_ingredients ing ON r.recipe_id = ing.rr_recipe_id
WHERE r.recipe_id = $1
ORDER BY ing.ingredients_id ASC; | true |
1c9fac9a2f4dfb0ddbdca8e408462a844e172c99 | SQL | nss-day-cohort-44/chinook-Suganya-dev | /Chinook_answer/20.top_agent.sql | UTF-8 | 215 | 3.484375 | 3 | [] | no_license | Which sales agent made the most in sales over all?
SELECT
e.EmployeeId,
e.Title,
MAX(i.Total)
FROM Employee e
JOIN Customer c
ON(e.EmployeeId = c.SupportRepId)
JOIN Invoice i
ON(c.CustomerId = i.CustomerId) | true |
fd98b32a2f4c607fd8a241f2e299c1609c561737 | SQL | chrisvanndy/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/3-force_name.sql | UTF-8 | 215 | 2.921875 | 3 | [] | no_license | -- Create a table named force_name with id INT, name VC(256) NOT NULL
-- if the table already exists the script should not fail
CREATE TABLE IF NOT EXISTS `force_name`(
`id` INT,
`name` VARCHAR(256) NOT NULL
);
| true |
24ccffee2ea58f6a56d1c956eec862a8db2e485f | SQL | apiddiu/whatdotodo | /src/main/resources/schema.sql | UTF-8 | 406 | 3.09375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS TODOITEM(ID BIGINT AUTO_INCREMENT PRIMARY KEY NOT NULL, USERNAME VARCHAR(255) NOT NULL, TITLE VARCHAR2(255), DESCRIPTION VARCHAR2(255), STATUS VARCHAR2(255));
CREATE INDEX IF NOT EXISTS USERNAME ON TODOITEM(USERNAME);
CREATE INDEX IF NOT EXISTS ITEM_USERNAME ON TODOITEM(ID, USERNAME);
CREAT... | true |
2b74019b5415fd666733c78e9bf7b62db093382c | SQL | evrimulgen/Oracle-DBA-Life | /SCRIPTS/tune_sc_a.sql | UTF-8 | 3,468 | 3.421875 | 3 | [
"MIT"
] | permissive | set echo on;
--connect internal;
--connect po8/po8@local
Rem ********************************************************************
Rem First create all the tables
Rem ********************************************************************
drop table stats$begin_stats;
create table stats$begin_stats as sele... | true |
8038b48578bc0676302331b179f574911e247b83 | SQL | alexbartley/SOCO-Test | /104909/SBXTAX3/Procedures/DATAX_TB_ZONES_132.sql | UTF-8 | 1,065 | 3.15625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE sbxtax3.datax_tb_zones_132
( taxDataProviderId IN NUMBER, runId IN OUT NUMBER)
IS
--<data_check id="132" name="EU As of Date is Null">
dataCheckId NUMBER := -633;
BEGIN
INSERT INTO datax_records (recorded_message, run_id)
VALUES ('DATAX_TB_ZONES_132 started.',runId) RETUR... | true |
04de6f5054bef5bcd3d8ce7a5369a0f478f7a56a | SQL | krishnamohankaruturi/secret | /aart-web-dependencies/db/dml/654.sql | UTF-8 | 7,407 | 2.875 | 3 | [] | no_license | --dml/654.sql
update authorities set displayname = 'Create new students(bundled)- cPass assessment' where authority = 'DYN_BUND_CARPATH_ASSESSMENT';
update grfreportdistrictshortname set organizationid =
(select id from organization where organizationname ='EDUCATIONAL PARTNERSHIP FOR INSTRUCTING CHILDREN (048242)')... | true |
820b5dfa669e3e94b33af69bbcd133edbcf6b291 | SQL | yangboz/bearded-shame | /assets/翻译部统计报表/报表脚本/function.sql | GB18030 | 8,924 | 3.5625 | 4 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION FORMAT_NUM(VAL VARCHAR)
RETURN VARCHAR IS RESULT VARCHAR(50);
BEGIN
SELECT decode(Instr(VAL,'.'),0,TO_CHAR(VAL,'FM999999990.90'),to_char(VAL,'FM999999990.90')) INTO RESULT FROM DUAL;
RETURN RESULT;
END;
/
create or replace function Get_StrArrayStrOfIndex
(
av_str varchar2, --Ҫַָ... | true |
ee7be7631dc48eaf5f1f8fb65733c200fe860545 | SQL | VRlectorium/courses_api | /db/createTables.sql | UTF-8 | 237 | 2.671875 | 3 | [] | no_license | CREATE TABLE courses (
id serial primary key,
name varchar(256) not null
);
CREATE TABLE subjects (
id serial primary key,
courseid integer REFERENCES courses(id),
name varchar(128) not null,
video varchar(255)
); | true |
a2a50f7011f3d6f86fe65eb5408365bb52a62fb7 | SQL | erjan/coding_exercises | /stratascratch/medium/interview_questions/Find countries that are in winemag_p1 dataset but not in winemag_p2.sql | UTF-8 | 275 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | Find countries that are in winemag_p1 dataset but not in winemag_p2.
Output distinct country names.
Order records by the country in ascending order.
select
distinct country
from winemag_p1 w1 where w1.country not in (select country from winemag_p2)
order by country desc
| true |
93eeb56cd1ef7c694a1d30e12ef0c47a6c69e870 | SQL | bdmlai/analytics_engineering_marts | /models/Redshift/fds_nplus/views/vw_aggr_daily_content_vod_viewership.sql | UTF-8 | 938 | 2.90625 | 3 | [] | no_license | {{
config({
"schema": 'fds_nplus',
"materialized": 'view','tags': "Content", "persist_docs": {'relation' : true, 'columns' : true},
"post-hook": ["grant select on {{this}} to public"]
})
}}
select a.production_id,
a.dim_stream_type_id,
a.stream_type_cd,
a.dim_content_id,
a.content_title,
a.class_name,
a.categ... | true |
549144aa3fd08717c826ab0178a7a939b46496e5 | SQL | lnodaba/JumpstartToSqlPerformance | /6 - Pagination.sql | UTF-8 | 446 | 3.890625 | 4 | [] | no_license | /*
Newer version of SQL supports this easy syntax.
*/
SELECT *
FROM Users
ORDER BY Id
OFFSET 10 ROWS
FETCH NEXT 10 ROWS ONLY;
/*
Old Version just for presentation purpose.
=> egy szikrat masabb a szintaxis es nehezebb is. De az Offsetes megoldas egy syntactic sugar ezen a megoldason.
*/
WITH CTE
A... | true |
496b50c15e7a4c0848d8405bca883b4d20f06b83 | SQL | Swarmops/Swarmops | /Database/Schemata/upgrade-0052.sql | UTF-8 | 1,856 | 3.546875 | 4 | [
"LicenseRef-scancode-warranty-disclaimer",
"CC0-1.0",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | ALTER TABLE `HotBitcoinAddresses`
ADD COLUMN `BitcoinChainId` INT NOT NULL DEFAULT 1 AFTER `OrganizationId`,
ADD COLUMN `AddressStringFallback` VARCHAR(48) NOT NULL DEFAULT '' AFTER `AddressString`,
ADD INDEX `Ix_Chain` (`BitcoinChainId` ASC),
ADD INDEX `Ix_Address2` (`AddressStringFallback` ASC)
#
DROP PROCEDURE... | true |
524be134fbc7435ea0283b07b75e0acc87edb03f | SQL | ddc67cd/database-scripts | /to_sort/oracle_apps/General/query_flexfield_structure.sql | UTF-8 | 757 | 3.109375 | 3 | [] | no_license | select fif.application_id
, fif.id_flex_code
, fif.id_flex_name
, fif.application_table_name
, fif.description
, fifs.id_flex_num
, fifs.id_flex_structure_code
, fifse.segment_name
, fifse.segment_num
, fifse.flex_value_set_id
from fnd_id_fl... | true |
633df4e832ed9e943802d338cad96822bad12857 | SQL | 15TIA-PemrogramanFramework/Kuis2_PrayogiAdhi | /kuis_1061.sql | UTF-8 | 2,710 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 13, 2017 at 04:47 PM
-- Server version: 5.7.15-log
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
9f4c75a98df5b5f39940b233d6f4b96c573ba495 | SQL | glennoph/mysql-data-analytics | /sql/select/11-select-where.sql | UTF-8 | 317 | 3.328125 | 3 | [] | no_license |
use employees;
-- select dept_no from departments
select dept_no from departments;
-- select all employeses with first name is Elvis
select * from employees
where first_name = 'Elvis';
-- get all female employees whose first name is Kellie
select * from employees
where gender = 'F' and first_name = 'Kellie';
| true |
498cefdbc65ce90a9c660d487dbe9c4e424991a3 | SQL | CrepeSoftwareFactory/CrepesCommander | /assets/bdd de base/cc-18-04-17.sql | UTF-8 | 10,360 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mar 18 Avril 2017 à 14:25
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
fc8bba4ed9c000452a760e922b682502a0a3789a | SQL | WiseManCAx/PHP | /5-FullProjects/atk-20131207/project/project.sql | UTF-8 | 1,455 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Време на генериране: декември 2013 в 20:33
-- Версия на сървъра: 5.1.41
-- Версия на PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHAR... | true |
2a83aa97d0ec8ff9c5fef74288b5bd00c104fc79 | SQL | elvslv/CompanyDatabase | /DB/createIndexes.sql | UTF-8 | 656 | 2.84375 | 3 | [] | no_license | Create index empl on Employee(Id);
Create index emplCompany on Employee(CompanyId);
Create index comp on Company(Id);
Create index contrId on Contract(Id);
Create index contrCompany on Contract(CompanyId);
Create index contrProject on Contract(ProjectId);
Create index jobEmpl on Job(EmployeeId);
Create index jobTask on... | true |
5d45ad9ad532447ac028fa695f7df9a9ab69f84f | SQL | rounantj/smartcomerci2 | /db_scripts/product.sql | UTF-8 | 427 | 3 | 3 | [] | no_license |
# Modelo tradicional com cada campo em uma coluna específica
create table products (
id integer not null auto_increment,
# For relationship
product_affiliate_id integer not null,
# Product data
product_descricao text,
product_valor float,
product_categoria text,
product_fabricacao text,
product_estoque integer,... | true |
7d6b1335ed76d86d41e5ef1e5c3715259146a722 | SQL | maclochlainn/adv-plsql-code | /chapter-04/ReadSmallFile.sql | UTF-8 | 2,517 | 3.890625 | 4 | [] | no_license | /*
* ReadSmallFile.sql
* Chapter 4, Oracle Database 12c PL/SQL Advanced Programming Techniques
* by Michael McLaughlin & John Harper
*
* ALERTS:
*
* This script creates a Java library that reads a file and translates
* it into a VARCHAR2 data type, which has a maximum limit of 4,000 bytes.
*/
/* E... | true |
29e65ae2b7bfe626908b12d5d0ff69f92e056b44 | SQL | trdtnguyen/sb-miniproject2 | /solutions/sql_q8_sol.sql | UTF-8 | 594 | 4.34375 | 4 | [] | no_license | /*
8. Write a SQL query to find the match number for the game with the highest number of
penalty shots, and which countries played that match.
*/
WITH MostPenaltyMatch AS(
SELECT match_no, COUNT(*) AS NumPenaltyShootouts
FROM penalty_shootout
GROUP BY match_no
ORDER BY NumPenaltyShootouts DESC
LIMIT 1
)
SELECT MostPe... | true |
40b4663044f3b320193108fb82994c12eeb2b919 | SQL | ferkopar/ToDoSchema | /CSV_UTIL_PKG_1.sql | UTF-8 | 9,719 | 3.40625 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Package Body CSV_UTIL_PKG
--------------------------------------------------------
CREATE OR REPLACE PACKAGE BODY "CSV_UTIL_PKG"
as
/*
Purpose: Package handles comma-separated values (CSV)
Remarks:
Who Date De... | true |
20bad04efade919817954fb1926c69001d50ea39 | SQL | shallowdream1997/more_mch_shop | /models/install.sql | UTF-8 | 145,663 | 3.484375 | 3 | [
"BSD-3-Clause"
] | permissive | -- Adminer 4.6.2 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE `hjmall_action_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(45) NOT NULL DEFAULT '' COMMENT '操作记录描述',
`addtime` int(11) NOT NU... | true |
850d8517a67ae5abfe08160678fb48cacf6f00ed | SQL | Vulnerator/Vulnerator | /Resources/DdlFiles/Tables/Create/StepOneQuestionnaireDeploymentLocations.ddl | UTF-8 | 452 | 3.734375 | 4 | [
"CC-BY-SA-3.0",
"CC-BY-ND-3.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS StepOneQuestionnaireDeploymentLocations (
StepOneQuestionnaireDeploymentLocation_ID INTEGER PRIMARY KEY,
StepOneQuestionnaire_ID INTEGER NOT NULL,
Location_ID INTEGER NOT NULL,
UNIQUE (StepOneQuestionnaire_ID, Location_ID) ON CONFLICT IGNORE,
FOREIGN KEY (StepOneQuestionna... | true |
8d4c947f33b2cef30e32b57ae872d22723fa0bfb | SQL | karpov-sv/favor2 | /db/meteo.sql | UTF-8 | 1,135 | 3.09375 | 3 | [] | no_license | -- All-sky images
DROP TABLE IF EXISTS meteo_images CASCADE;
CREATE TABLE meteo_images (
id SERIAL PRIMARY KEY,
filename TEXT,
night TEXT,
time TIMESTAMP,
exposure FLOAT
);
CREATE INDEX meteo_images_filename_idx ON meteo_images(filename);
CREATE INDEX meteo_images_night_idx ON meteo_i... | true |
3273b6d15cc44a94d1ca4deb75a05c46ada7d8b5 | SQL | jasonjimnz/ORT | /recommendation-tourism/src/main/resources/db-oracle/sql-availability.sql | UTF-8 | 1,333 | 3.28125 | 3 | [
"MIT"
] | permissive | ---------------------------------------------------------
-- DDL para almacenar visitas por día
---------------------------------------------------------
DROP TABLE INDICATORS_AVAILABILITY;
CREATE TABLE INDICATORS_AVAILABILITY(
INDICATOR_ID NUMBER(10,0) NOT NULL,
HOTEL VARCHAR2(20) NOT NULL,
LOCATION1 VARCHAR2... | true |
3031c288a61a8c95f7662fbf772cd5ed2778ab36 | SQL | dimamik/AGH_Databases | /Labs/Lab_2/Lab_2_Cw_Koncowe.sql | UTF-8 | 5,161 | 3.9375 | 4 | [] | no_license | /* AGREGATY ĆWICZENIE KOŃCOWE */
/* Cwiczenie 1 2/4*/
/* Zad Z Cwiczenia */
-- use Northwind
-- select OrderID
-- from [Order Details]
-- group by OrderID
-- having sum(Discount) = 0
/* Liste zamowien przez kazdego przcownika z podzialem na lata kwartale miesiace */
-- SELECT EmployeeID, YEAR(OrderDate) as Ye... | true |
8dbf37131d52a450368e2cb971dad325c20b7a30 | SQL | markojeremic/C2S-2021-FINAL | /c2s.sql | UTF-8 | 2,907 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 15, 2021 at 12:10 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
6a4ae181f71c29bd05ea5d49d2c84acc53b828c1 | SQL | fenjiot/metis_classwork | /week_02/sql_problems/problem_2.1.sql | UTF-8 | 191 | 3.640625 | 4 | [] | no_license | -- Return gallery names that have an image named like "Grumpy"
SELECT galleries.name
FROM galleries INNER JOIN images ON (galleries.id = images.gallery_id)
WHERE images.name LIKE 'Grumpy%';
| true |
43fca9d09025eab0dd8bec134177538c074c05e1 | SQL | miprimohacewebs/Dialnet | /Laravel/storage/app/database/02 - Inserts.sql | UTF-8 | 11,573 | 2.65625 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: homestead.app
-- Versión del servidor: 5.7.18-0ubuntu0.16.04.1 - (Ubuntu)
-- SO del servidor: Linux
-- HeidiSQL Versión: 9.4.0.5125
-- --------------------------------------------------------
/... | true |
70c58f1b334349456fb5cc9e0032b49193aa20c8 | SQL | sgreenholtz/Event-Spider | /eventspider/event-spider.sql | UTF-8 | 247 | 3.15625 | 3 | [
"MIT"
] | permissive | USE eventspider;
CREATE TABLE IF NOT EXISTS Users (
user_id INT AUTO_INCREMENT,
email VARCHAR(255) UNIQUE,
password VARCHAR(32) NOT NULL,
first_name VARCHAR(255),
last_name VARCHAR(255),
role VARCHAR(30) DEFAULT 'Member',
PRIMARY KEY (user_id)
); | true |
d05cd801ac1b0c6a5682ae66e6b020833645acdc | SQL | imo-mp-20/Kanshin_Vlad | /lab_3/Лаб3_запросы/8_3.sql | UTF-8 | 148 | 3.03125 | 3 | [] | no_license | select onum, comm*amt
from customers, orders, salespeople
where rating > 100
and orders.cnum = customers.cnum
and orders.snum = salespeople.snum | true |
5e7d00b03edd2d503085f8b1aff9cd88a9dbe407 | SQL | mrocuts/primo | /Database/DB_PRIMOS.sql | UTF-8 | 2,732 | 3.734375 | 4 | [] | no_license | /**
DB_PRIMOS.sql
Esquema iniciai de la base de datos PRIMOS
Autor : PRIMOS
Versión : 1.0
**/
-- Creación de la base de datos
-- Database: db_primos
-- DROP DATABASE db_primos;
CREATE DATABASE db_primos
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'Spanish_Colombia.1252'
LC_CTYPE = 'Spa... | true |
23b53f747a5290592217dfe85e4495981fe2e03a | SQL | maquiavelo79/bodyflex | /dataBase/[SP]/SP_WPRO_CONSULTA_PUBLICACION_SEGUIR.sql | UTF-8 | 804 | 2.953125 | 3 | [] | no_license |
-- select * from profesional
-- CALL SP_WPRO_CONSULTA_PUBLICACION_SEGUIR('13661574','pro@bo.cl', @codErr);
-- SELECT @codErr;
-- select * from votacion
DROP PROCEDURE IF EXISTS bodyflex.SP_WPRO_CONSULTA_PUBLICACION_SEGUIR;
CREATE PROCEDURE bodyflex.`SP_WPRO_CONSULTA_PUBLICACION_SEGUIR`(
... | true |
18705c274670389db246d4647129719fd1f251e6 | SQL | cv9955/cv2017 | /sql/Clientes.sql | UTF-8 | 3,577 | 2.71875 | 3 | [] | no_license | CREATE TABLE "CLI_ESTADO"
( "ID" NUMBER NOT NULL ENABLE,
"ESTADO" VARCHAR2(20),
CONSTRAINT "CLI_ESTADO_PK" PRIMARY KEY ("ID") ENABLE
)
/
CREATE TABLE "CLI_VENDEDOR"
( "ID" NUMBER(*,0) NOT NULL ENABLE,
"NOMBRE" VARCHAR2(200) NOT NULL ENABLE,
"APELLIDO" VARCHAR2(200),
"TELEFONO" VARCHAR2(200),
"... | true |
4c1355c617c2889090c67a956cad8694422d31ce | SQL | Lzw2016/clever-canal | /clever-canal-parse/src/main/resources/database/clever-canal-parse_Derby.sql | UTF-8 | 2,916 | 3.359375 | 3 | [
"MIT"
] | permissive | -- create database if not exists `clever-canal` default character set = utf8;
-- use `clever-canal`;
/* ====================================================================================================================
meta_history -- 表结构变化明细表
=====================================================================... | true |
bd41044b1cfea5e310c074b1a636bf0066ae1b69 | SQL | patrickJarv/OnlineUno | /src/Database/uno.sql | UTF-8 | 390 | 3.140625 | 3 | [] | no_license | DROP DATABASE IF EXISTS uno;
CREATE DATABASE uno;
USE uno;
CREATE TABLE Users (
ID INT NOT NULL AUTO_INCREMENT,
Username VARCHAR(255) UNIQUE NOT NULL,
Password VARCHAR(255) NOT NULL,
Wins INT,
Losses INT,
PRIMARY KEY (ID)
);
INSERT INTO Users (Username, Password, Wins, Losses)
VALUES
("Jared"... | true |
c4dce1c6baaa01d8ab9ab6c36cd9f45656ad2c74 | SQL | lrgogo/qar | /config/batch_insert_reply.sql | UTF-8 | 953 | 3.578125 | 4 | [] | no_license |
SET FOREIGN_KEY_CHECKS=1;
DROP TABLE IF EXISTS `temp_reply`;
CREATE TABLE `temp_reply`(
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`c` VARCHAR(100) NOT NULL COMMENT '内容',
PRIMARY KEY (`id`)
)AUTO_INCREMENT=1;
SELECT * FROM temp_reply;
DELETE FROM reply;
DELIMITER $$
DROP PROCEDURE IF EXISTS proc_batc... | true |
1427a2d1ab931684afeba8b03d1aea7bf63aebf0 | SQL | eldarba/822-130 | /Lesson 17 sql/sql scripts/script1.sql | UTF-8 | 1,862 | 4.09375 | 4 | [] | no_license | -- select
-- DML - Data Manipulation Language (insert, update, delete)
-- DDL - Data Definition Language (create, drop)
-- constraints - אילוצים
-- not null
-- unique
-- check
-- PK
-- FK
create database x;
drop database x;
CREATE TABLE x.product (
id INT AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`descript... | true |
66af7af619b6f687de31f575d9fd1adaa9248f61 | SQL | clouddra/social_feed | /migrations/2018-11-16-094753_create_users/up.sql | UTF-8 | 135 | 3.03125 | 3 | [] | no_license | CREATE TABLE users (id INTEGER NOT NULL PRIMARY KEY, name VARCHAR NOT NULL UNIQUE);
CREATE UNIQUE INDEX idx_users_name ON users(name);
| true |
893cb85011ae14275893fff5f95554f9d5a14b2a | SQL | yangxy16/IPPool | /Tools/ippool.sql | UTF-8 | 886 | 2.78125 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50720
Source Host : 127.0.0.1:3306
Source Database : ippool
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-01-04 15:23:38
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
5c035273dbd70ff1e2b38e514839907ce0161708 | SQL | falent05/cscripts | /cs_LGWR_trc.sql | UTF-8 | 1,232 | 2.59375 | 3 | [] | no_license | ----------------------------------------------------------------------------------------
--
-- File name: cs_LGWR_trc.sql
--
-- Purpose: Get log writer LGWR trace
--
-- Author: Carlos Sierra
--
-- Version: 2020/12/06
--
-- Usage: Execute connected to CDB or PDB.
--
-- Example: $ sqlplus / as sy... | true |
d44f7ad3c571d8e2eacbf2036f726c8026d3c010 | SQL | xiaofengzcd/zcd | /classes/artifacts/maven02_war_exploded/WEB-INF/classes/DB.sql | UTF-8 | 10,022 | 3.203125 | 3 | [] | no_license | /*
SQLyog Ultimate v11.5 (64 bit)
MySQL - 5.5.29 : Database - zcx
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CH... | true |
4ef30ebef374e2d78b5812e30961ee0eade9f159 | SQL | Insan23/MVC | /mvc.sql | UTF-8 | 4,306 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2018 at 08:22 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
08b54fe09c1a9e432e7faad0d90b0b65797a8621 | SQL | microsoft/dicom-server | /src/Microsoft.Health.Dicom.SqlServer/Features/Schema/Sql/Sprocs/GetChangeFeedV6.sql | UTF-8 | 1,035 | 3.625 | 4 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MS-PL",
"OFFIS",
"IJG",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | /***************************************************************************************/
-- STORED PROCEDURE
-- GetChangeFeedV6
--
-- FIRST SCHEMA VERSION
-- 6
--
-- DESCRIPTION
-- Gets a stream of dicom changes (instance adds and deletes)
--
-- PARAMETERS
-- @limit
-- * Max rows to return
-- ... | true |
48e5694ad9b5528e9d47608185839e7d8d055c73 | SQL | ngodingtah/kuis1 | /id10766986_rio_db.sql | UTF-8 | 2,073 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 03, 2019 at 02:39 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
889dba35401251a6ae0e172c599ee5aa461cefce | SQL | prateep4u/mgmt | /management.sql | UTF-8 | 4,016 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 19, 2016 at 12:42 PM
-- Server version: 5.5.20
-- PHP Version: 5.3.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
2ffa691c47a927caf95dede90bf2c53314141f83 | SQL | CJBuck/AssetWorksConversion | /Loading/PurchaseOrders/CurrentCycle/Code/LoadPurchaseOrdersRelatedWorkOrders.sql | UTF-8 | 445 | 2.546875 | 3 | [] | no_license | SELECT
'2325' [SCREEN],
'[KEY]' [PurchaseOrderID], '8904:3' [LineNumber], '8904:4' [WorkOrderLocationID],
'8904:5' [WorkOrderYear], '8904:6' [WorkOrderNumber],
'8904:7' [Quantity], '8904:8' [TaskID]
UNION ALL
SELECT
[Control], PurchaseOrderID, CAST(LineNumber AS VARCHAR),
WorkOrderLocationID, CAST(WorkOrderYear A... | true |
303f63a6cf8919a13c790c2924f845916c601f9c | SQL | cybertec-postgresql/pgwatch2 | /pgwatch2/sql/metric_store/timescale/metric_store_timescale.sql | UTF-8 | 2,162 | 3.828125 | 4 | [
"BSD-3-Clause"
] | permissive | /*
NB! Make sure you're on PG v11+ and TimescaleDB v1.7+.
A fresh separate DB, only for pgwatch2 metrics storage purposes, is assumed.
*/
CREATE SCHEMA IF NOT EXISTS subpartitions AUTHORIZATION pgwatch2;
CREATE EXTENSION IF NOT EXISTS timescaledb;
CREATE EXTENSION IF NOT EXISTS btree_gin;
SET ROLE TO pgwatch2;
... | true |
4b532cf064b9ad4fa21bcdd2cbd728886b24756f | SQL | WagnerMontanini/goomerapi | /exemplo/DB/GoomerApi.sql | UTF-8 | 3,447 | 3.40625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- --------------------------------------------------------
-- Servidor: localhost
-- Versão do servidor: 10.5.9-MariaDB - mariadb.org binary distribution
-- OS do Servidor: Win64
-- HeidiSQL Versão: 10.2.0.5599
-- ------------------------------------------------... | true |
b737fb63e67060649cbd9e1592f66331f9b80292 | SQL | wisnu025/Queri_Analisis_AGO | /AGO_detail.sql | UTF-8 | 1,266 | 3.515625 | 4 | [] | no_license | select
pgl.plant,
pln.plant_name,
pgl.stor_loc,
loc.stor_loc_name as Gudang,
pgl.tgl_dokumen as Doc_date,
pgl.tgl_pengeluaran as Post_date,
(pgl.tgl_pengeluaran-pgl.tgl_dokumen)jarak_hari,
count(pgl.material_document) as total_pemakaian
--rsl.message AS Error
from
AGODIST.trans... | true |
5037eb12bd13afec13de84b4cc527e2ad4aa05ba | SQL | azeez-fazry/Hospital-Management-System | /Back End/SQL Files.sql | UTF-8 | 13,764 | 3.609375 | 4 | [] | no_license | /*
* @author : AzeezFazry
* @e-mail : azeezfazry@gmail.com
* @github : github.com/azeez-fazry
*/
/*
* CREATE DATABASE `HOSPITAL_MANAGEMENT_SYSTEM`
*/
DROP DATABASE IF EXISTS `HOSPITAL_MANAGEMENT_SYSTEM`;
CREATE DATABASE `HOSPITAL_MANAGEMENT_SYSTEM`;
USE `HOSPITAL_MANAGEMENT_SYSTEM`;
/*
* TABLE STRUCTURE FOR... | true |
1b0953c067453fedf535fec18cc322a822622fce | SQL | fairfield-university-is510-fall2017/is510-classnotes-EnguChen1993 | /Schemas/DBP-e14-MySQL-WPC-Database/DBP-e14-MySQL-WPC-CH07-Create_Views.sql | UTF-8 | 2,915 | 3.96875 | 4 | [] | no_license | /* 7.65 - 66 Prose */
/* 7.67 */
/****** Create View *******************************************************/
CREATE VIEW EmployeePhoneView AS
SELECT LastName AS EmployeeLastName,
FirstName AS EmployeeFirstName,
Phone AS EmployeePhone
FROM EMPLOYEE;
/****** Query View *******************************... | true |
dd8ae6ff23c2b8d0377aa63d639b403acd9ba90d | SQL | Ljhansi-pk/ICS | /ICS/.svn/pristine/61/61f6531d95998e3f61751519e463b6f6ad6b05b4.svn-base | UTF-8 | 1,257 | 3.140625 | 3 | [] | no_license | select * from ICS.productcountry pc where pc.skuid in (select skuid from certificate );
update ICS.productcountry pc set pc.REQUESTSTATUS=null
where pc.skuid in (select skuid from certificate );
delete from beadunseatdtl ;
delete FROM BEADUNSEATHDR ;
delete from plungerdtl ;
delete FROM plungerhdr ;
delete from mea... | true |
9e7a91d5674643144d6187deaebd8e89e41c083e | SQL | josephstalin117/CHIGIX-SERVICE | /chigi_page.sql | UTF-8 | 1,409 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | # Host: CHIGIX.com (Version: 5.5.16-log)
# Date: 2013-03-12 12:25:42
# Generator: MySQL-Front 5.3 (Build 2.36)
/*!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 */;
/*!40... | true |
9fb098f3c03c9dc04908a78a01a7569db807761b | SQL | byan21/esco123 | /data_sql.sql | UTF-8 | 2,877 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 10, 2017 at 01:38
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
67ec3b035222145620878680a43fcde27df6e407 | SQL | sathapa/BigDataAnalytics_AirlinesTraffic_Python_Spark | /JoinQuery-bestflights.sql | UTF-8 | 206 | 3.609375 | 4 | [] | no_license | use flights;
select sbf.month,sbf.day,sbf.unique_carrier,sbf.delayed15
from spark_besttimeflights sbf
inner join carriers c where c.code=sbf.unique_carrier
ORDER BY CAST(delayed15 as SIGNED INTEGER) DESC;
| true |
e512efd34a99b2ae7796b1c833aa0ddc37af2679 | SQL | sourabhdpunja/JavaChatBotServerProject | /Final Submission/Setup/MYSQL/MYSQL_Backup.sql | UTF-8 | 3,061 | 3.046875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `team212` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `team212`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: prattledb.cfmiqlmluzk4.us-east-1.rds.amazonaws.com Database: team212
-- ------------------------------------------------------
-- Server version 5... | true |
8efb3acb9be73e3502a5dd6fbabc56d4d4808318 | SQL | WildCodeSchool/bordeaux-0218-php-festizik | /data/festizik.creator.sql | UTF-8 | 5,506 | 3.671875 | 4 | [] | no_license | -- handwritten script. I'll be glad you tell me if that works ok for you.
--
-- creation of the user and its rights
DROP USER IF EXISTS festiv@localhost;
CREATE USER festiv@localhost IDENTIFIED BY 'Fetiv?Ultra!';
GRANT SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP ON festizik.* TO 'festiv'@'localhost';
-- TODO... | true |
68ffdf2490f8e07edf51d96ad12aa5dd1a0b722f | SQL | nwabisadlokweni/waiter-webapp | /tables.sql | UTF-8 | 779 | 3.34375 | 3 | [] | no_license | DROP table if exists weekdays, waiters, bhelekazi;
--database name waiter_tests
create table weekdays(
id serial not null primary key,
days text not null
);
insert into weekdays(days) values ('Monday');
insert into weekdays(days) values ('Tuesday');
insert into weekdays(days) values ('Wednesday');
insert into weekdays... | true |
dead9c344797a3f5da887364af043a0705321b18 | SQL | phpbee/phpbee | /packages/roundrobin/rouundrobin.sql | UTF-8 | 1,430 | 3.765625 | 4 | [] | no_license |
CREATE PROCEDURE rr_stack (CID INT, SID INT, stack_name VARCHAR(255), STARTSLOT INT, ENDSLOT INT)
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE recid INT;
DECLARE rs_name, rec_add_intvalue, rec_add_stringvalue VARCHAR(255);
DECLARE cur1 CURSOR FOR SELECT distinct record_id, recordset_name, add_intvalue... | true |
86d0ed02326f513b689b226d204c8b3ba56e050c | SQL | olegshendrik/smart-home | /database/migrations/20170121_012242_devices.sql | UTF-8 | 925 | 2.96875 | 3 | [
"MIT"
] | permissive | -- +migrate Up
CREATE TABLE devices (
id Int( 11 ) AUTO_INCREMENT NOT NULL,
name VarChar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
description VarChar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
device_id Int( 11 ) NULL,
created_at DateTime NOT NULL,
update_at DateTime NOT NULL,
node_i... | true |
9ff700c7f0edaf441e2c3a34b70b78d1418c4660 | SQL | Celtus/custom-database | /mangos/pool_creature.sql | UTF-8 | 5,387 | 2.9375 | 3 | [] | no_license | -- -------------------------------------------------------------------
-- Database
-- -------------------------------------------------------------------
-- Table : pool_creature
-- Filename : pool_creature.sql
-- -------------------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_... | true |
fd2adaa6a8ca5b78d791025cf8aa7350ea5a9117 | SQL | ozcankursun/e-shop-back-end | /create.sql | UTF-8 | 626 | 3.34375 | 3 | [] | no_license | CREATE TABLE manufacturers (
id INT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
country_code VARCHAR(100) NOT NULL,
link VARCHAR(100),
description VARCHAR(100),
more_description VARCHAR(100)
);
CREATE TABLE clothes (
id INT PRIMARY KEY,
code VARCHAR(50) NOT NULL UNIQUE,
image_filename VARCHAR(50) NOT NULL UNIQUE... | true |
a77244fb4d5d0d3d4685ad6768f08266056fba23 | SQL | jerzynrl/AppSWII | /estadistica.sql | UTF-8 | 4,641 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-10-2017 a las 22:46:36
-- Versión del servidor: 10.1.13-MariaDB
-- Versión de PHP: 7.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
a9dfcb9659a1c5d34407a8e806148b82f1937101 | SQL | SillyBoy007/comprehensive-old | /src/main/webapp/sql/comprehensive_old.sql | UTF-8 | 9,862 | 3.234375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql-localhost
Source Server Version : 50640
Source Host : localhost:3306
Source Database : comprehensive_old
Target Server Type : MYSQL
Target Server Version : 50640
File Encoding : 65001
Date: 2019-01-22 11:49:53
*/
SET FOREIGN_KEY... | true |
af2ca512308d631dd02b3602372ef596070f8f06 | SQL | fstanchese/corporativo | /corporativo/sql/WOAXAnexoTi/WOAXAnexoTi_qGeralEntrada.sql | UTF-8 | 289 | 2.84375 | 3 | [] | no_license | select
WOAXAnexoTi.*,
WOcorrAss.NomeNet || ' - ' || AnexoTi_gsRecognize(AnexoTi_Id) as Recognize
from
WOAXAnexoTi,
WOcorrAss
where
WOAXAnexoTi.WOcorrAss_Id = WOcorrAss.Id
and
(
WOAXAnexoTi.DocEntrega is null
or
WOAXAnexoTi.DocEntrega = 'off'
)
order by
Recognize
| true |
fbac169c30daba9447a520782811ee8741228dae | SQL | helver/Alliances | /PHP/GeoNet/db/Procedures/Status_To_TIDs_Rollup_Proc.sql | UTF-8 | 580 | 3.140625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE status_to_tids_rollup
( xtid_id IN tids.id%TYPE )
AS
status tids.flag%TYPE := 4;
xcause tids.cause%TYPE := NULL;
BEGIN
SELECT flag INTO status FROM tid_interface_status WHERE tid_id = xtid_id AND flag = (SELECT max(flag) FROM tid_interface_status WHERE tid_id = xtid_id) AND rownum = 1;... | true |
048ad0c68364b7be31dee231e5ecaa9c8427c3b9 | SQL | krishnamohankaruturi/secret | /aart-web-dependencies/db/stage/ddl/17.sql | UTF-8 | 2,168 | 3.671875 | 4 | [] | no_license | -- stage/ddl/17.sql
--For schema changes in domainaudithistory and useraudittrailhistory table
ALTER TABLE domainaudithistory ADD COLUMN status character varying(20) NOT NULL DEFAULT 'PENDING';
ALTER TABLE useraudittrailhistory DROP COLUMN source, DROP COLUMN eventtype;
ALTER TABLE useraudittrailhistory RENAME histori... | true |
839cbced3967d6f6b2830002977688d6e82f8cf0 | SQL | vtirado73/agni | /database/migrations/20210503144054_create_table_behavior_logs.sql | UTF-8 | 590 | 3.09375 | 3 | [] | no_license | -- migrate:up
CREATE TABLE IF NOT EXISTS behavior_logs (
id VARCHAR(200) NOT NULL,
uid VARCHAR(200) NOT NULL,
click_count INT(11) DEFAULT 0,
time_on_page INT(11) NOT NULL DEFAULT 0,
referrer VARCHAR(512),
refocus_count INT(11),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
up... | true |
f3f033cccff2d8d1ebd112f07c5dd38d28202a9b | SQL | RazielRodrigues/oracle-learning-path | /Exercicios/TABLE/TABLE_CORES.sql | UTF-8 | 115 | 2.671875 | 3 | [] | no_license | CREATE TABLE CORES(
ID NUMBER(2) PRIMARY KEY,
NOME VARCHAR(120) NOT NULL,
CONSTRAINT UQ_COR_NOME UNIQUE(NOME)
);
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.